Esempio n. 1
0
func main() {
	cmdSendKey.Flags.DurationVar(&flagSendKeyExpiry, "for", 0, "Duration of key validity (zero implies no expiration)")
	cmdline.HideGlobalFlagsExcept()
	root := &cmdline.Command{
		Name:  "lock",
		Short: "claim and manage locks",
		Long: `
Command lock claims and manages lock devices.
`,
		Children: []*cmdline.Command{cmdScan, cmdUsers, cmdClaim, cmdLock, cmdUnlock, cmdStatus, cmdListKeys, cmdRecvKey, cmdSendKey},
	}
	cmdline.Main(root)
}
Esempio n. 2
0
func main() {
	cmdRoot.Flags.StringVar(&configDir, "config-dir", "", "Directory where the lock configuration files are stored. It will be created if it does not exist.")
	cmdline.HideGlobalFlagsExcept()
	cmdline.Main(cmdRoot)
}