File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 27
27
GitTreeState = unknownProperty
28
28
// GitTag shows latest tag if injected by go -ldflags, otherwise it is invisible.
29
29
GitTag = unknownProperty
30
- // BuildDate shows the built time for the associated binary.
31
- // Expect to be filled via go -ldflags during compiling.
30
+ // BuildDate shows the built time for the associated binary if injected by go -ldflags. otherwise it is invisible.
32
31
BuildDate = unknownProperty
33
32
// Platform composes with GOARCH and GOOS automatically.
34
33
Platform = unknownProperty
@@ -72,7 +71,10 @@ func Version() {
72
71
xprintf (format , "Git state" , GitTreeState )
73
72
}
74
73
75
- xprintf (format , "Built date" , BuildDate )
74
+ if BuildDate != unknownProperty {
75
+ xprintf (format , "Built date" , BuildDate )
76
+ }
77
+
76
78
if BuildComments != unknownProperty {
77
79
xprintf (format , "Built comments" , BuildComments )
78
80
}
You can’t perform that action at this time.
0 commit comments