Stubs in keyring subcommand
This commit is contained in:
parent
0253b79881
commit
20d0b556ea
30
cmd/pm/main.go
Normal file
30
cmd/pm/main.go
Normal file
@ -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)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user