1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
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())
s := fmt.Sprintf("%s %s Built on raw(%v) %s (from argv)", me.ARGNAME, me.VERSION, me.BUILDTIME, cobol.Time(me.BUILDTIME))
log.Info(s)
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 raw(%s) %s", pb.Argname, me.VERSION, me.BUILDTIME, cobol.Time(me.BUILDTIME))
}
*/
func StandardVersion(ARGNAME, VERSION, BUILDTIME string) string {
return fmt.Sprintf("%s %s Built on raw(%v) %s (from argv)", ARGNAME, VERSION, BUILDTIME, cobol.Time(BUILDTIME))
}
|