|
|
@ -8,9 +8,30 @@ import ( |
|
|
|
_ "net/http/pprof" |
|
|
|
etNode "node/app" |
|
|
|
"os" |
|
|
|
"runtime" |
|
|
|
) |
|
|
|
|
|
|
|
var ( |
|
|
|
VERSION string |
|
|
|
SVN_REVISION string |
|
|
|
BUILD_NUMBER string |
|
|
|
BUILD_TIME string |
|
|
|
GO_VERSION string |
|
|
|
) |
|
|
|
|
|
|
|
func logVersions() { |
|
|
|
log.Printf("Version:%s", VERSION) |
|
|
|
log.Printf("SVN Revision:%s", SVN_REVISION) |
|
|
|
log.Printf("Build Number:%s", BUILD_NUMBER) |
|
|
|
log.Printf("Build Time:%s", BUILD_TIME) |
|
|
|
log.Printf("Go Version:%s", GO_VERSION) |
|
|
|
log.Printf("Go OS/Arch:%s/%s", runtime.GOOS, runtime.GOARCH) |
|
|
|
log.Println() |
|
|
|
} |
|
|
|
|
|
|
|
func main() { |
|
|
|
logVersions() |
|
|
|
|
|
|
|
//获取状态集合序号
|
|
|
|
hostName, err := os.Hostname() //"etgo-0"
|
|
|
|
if err != nil { |
|
|
|