summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--argv.Version.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/argv.Version.go b/argv.Version.go
index e54fb3e..7882474 100644
--- a/argv.Version.go
+++ b/argv.Version.go
@@ -7,6 +7,13 @@ import (
"go.wit.com/lib/cobol"
)
+func Version() string {
+ if PB == nil || PB.AppInfo == nil {
+ return fmt.Sprintf("argv was not initialized by your application %v", os.Args)
+ }
+ return PB.AppInfo.getVersion()
+}
+
func (pb *Argv) Version() string {
return pb.AppInfo.getVersion()
}