Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译 #11

Open
lc-1010 opened this issue Jun 21, 2023 · 2 comments
Open

编译 #11

lc-1010 opened this issue Jun 21, 2023 · 2 comments

Comments

@lc-1010
Copy link
Owner

lc-1010 commented Jun 21, 2023

  • 交叉编译
  • 编译缓存
  • 文件写入和大小管理
@lc-1010
Copy link
Owner Author

lc-1010 commented Jul 5, 2023

./OneBlogService -version
build_time: 2023-07-05,15:56:54
build_version: 1.0.0
git_commit_id: 84a0090

@lc-1010
Copy link
Owner Author

lc-1010 commented Jul 5, 2023

缩小二进制

go build -ldflags="-w -s"
-w 取出dwarf 调试信息 ,panic 时没有调用信息
-s 去除符号表信息,无法gdb 调试

lc-1010 added a commit that referenced this issue Jul 5, 2023
…ersion information to the build process

In order to ensure a smooth and graceful shutdown of the application,
signal handling logic has been implemented to capture SIGINT and SIGTERM
signals. This allows the application to properly clean up resources and
terminate gracefully

To enhance the build process, version information has been added to the
compiled output. This provides better visibility and traceability of the
generated artifacts.

#11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant