Skip to content

Commit f5f15cb

Browse files
author
Chris Cooper
committed
adds version
1 parent 1a88d01 commit f5f15cb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

main.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ var (
2121
oyaml bool
2222
inyaml bool
2323
verbose bool
24+
printVersion bool
25+
)
26+
27+
const (
28+
version = "cf_parameter_generator: v1.9"
2429
)
2530

2631
func init() {
@@ -33,7 +38,12 @@ func init() {
3338
flag.BoolVar(&oyaml, "outyaml", false, "Will output in yaml instead of json.")
3439
flag.BoolVar(&inyaml, "inyaml", false, "Will expect input as yaml instead of json.")
3540
flag.BoolVar(&verbose, "v", false, "Places verbose output in the ParameterValue field to be replaced.")
41+
flag.BoolVar(&printVersion, "version", false, "Print the version and exits.")
3642
flag.Parse()
43+
if printVersion {
44+
fmt.Println(version)
45+
os.Exit(0)
46+
}
3747
}
3848

3949
func config() *cfpgen.Config {

0 commit comments

Comments
 (0)