go build 参数

https://segmentfault.com/a/1190000008323048

--ldflags

    package main

    import "fmt"

    var( VERSION string

        BUILD_TIME string

        GO_VERSION  string

)

        func main(){ 

             fmt.Printf("%s\n%s\n%s\n", VERSION, BUILD_TIME, GO_VERSION)

        }

你可能感兴趣的:(go build 参数)