diff --git a/cmd/pm/main.go b/cmd/pm/main.go new file mode 100644 index 0000000..fe66ae5 --- /dev/null +++ b/cmd/pm/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "os" +) + +const usage = `pm: simple, cross-platform system package manager + +subcommands: + keyring (key) -- interact with pm's OpenPGP keyring +` + +func main() { + if len(os.Args) < 2 { + fatal(usage) + } + cmd := os.Args[1] + + switch cmd { + case "key", "keyring": + default: + fatal("uknown subcommand %q\n\nusage: %v", cmd, usage) + } +} + +func fatal(f string, args ...interface{}) { + fmt.Fprintf(os.Stderr, f, args...) + os.Exit(1) +}