Huny's Dev Blog

Golang Release 빌드

1 min read|
Golang Release 빌드
go build -trimpath -ldflags "-w -s" -o <path> <package>
bash

-trimpath: stacktrace에서 go 파일 전체 절대 경로를 패키지 기준 상대경로로 변경

-ldflags "-w -s": stripped 출력물 생성, debugging 기능 제외

Subscribe to our newsletter

Get the latest news and updates from our team