- blobSigningTTL := flags.Duration(
- "blob-signing-ttl",
- 0*time.Second,
- "Lifetime of blob permission signatures on source keepservers. If not provided, this will be retrieved from the keepservers.")
-
- // Parse args; omit the first arg which is the command name
- flags.Parse(os.Args[1:])
+ srcBlobSignatureTTLFlag := flags.Duration(
+ "src-blob-signature-ttl",
+ 0,
+ "Lifetime of blob permission signatures on source keepservers. If not provided, this will be retrieved from the API server's discovery document.")
+
+ getVersion := flags.Bool(
+ "version",
+ false,
+ "Print version information and exit.")
+
+ if ok, code := cmd.ParseFlags(flags, os.Args[0], os.Args[1:], "", os.Stderr); !ok {
+ os.Exit(code)
+ } else if *getVersion {
+ fmt.Printf("%s %s\n", os.Args[0], version)
+ os.Exit(0)
+ }