Skip to content

Commit

Permalink
add version cli flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuchard committed Jul 31, 2024
1 parent 8134e91 commit 4ecc53e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ import (
)

func main() {
// cli flag for hcl config file path
// cli flags for hcl config file path and version
hclConfigPath := flag.String("c", "", "path to hcl file for backup configuration")
version := flag.Bool("version", false, "display current version")
flag.Parse()

// version output
if *version {
log.Print("1.1.2")
return
}

// construct vault raft backup config
backupConfig, err := util.NewBackupConfig(*hclConfigPath)
if err != nil {
Expand Down

0 comments on commit 4ecc53e

Please sign in to comment.