diff options
Diffstat (limited to '')
| -rw-r--r-- | cmd/x509info/main.go (renamed from cmd/x509-info/main.go) | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cmd/x509-info/main.go b/cmd/x509info/main.go index 65ac548..c425c45 100644 --- a/cmd/x509-info/main.go +++ b/cmd/x509info/main.go @@ -8,6 +8,8 @@ import ( "html/template" "os" "time" + + "github.com/fcuny/world/internal/version" ) const usage = `Usage: @@ -22,8 +24,6 @@ Options: -h, --help Print this message ` -var Version, BuildDate string - func main() { flag.Usage = func() { fmt.Fprintf(os.Stderr, "%s\n", usage) } @@ -46,11 +46,8 @@ func main() { flag.Parse() if versionFlag { - if Version != "" { - fmt.Printf("version: %s, build on: %s\n", Version, BuildDate) - return - } - fmt.Println("(unknown)") + information := version.VersionAndBuildInfo() + fmt.Println(information) return } |
