package argvpb // initializes logging and command line options import ( "fmt" "os" "go.wit.com/lib/cobol" "go.wit.com/log" ) func (pb *Argv) Version() string { return pb.getVersion() } func doVersion(pb *Argv) { log.Info(pb.getVersion()) os.Exit(0) } func (pb *Argv) getVersion() string { if me.buildtime == nil { return "app doesn't have argv.BuildVersion()" } BUILDTIME, VERSION := me.buildtime() return fmt.Sprintf("%s %s Built on %s", pb.Argname, VERSION, cobol.Time(BUILDTIME)) } func StandardVersion(ARGNAME, VERSION, BUILDTIME string) string { return fmt.Sprintf("%s %s Built on %s", ARGNAME, VERSION, cobol.Time(BUILDTIME)) }