aboutsummaryrefslogtreecommitdiff
path: root/check.go
diff options
context:
space:
mode:
Diffstat (limited to 'check.go')
-rw-r--r--check.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/check.go b/check.go
deleted file mode 100644
index 2dfb786..0000000
--- a/check.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "context"
- "flag"
- "fmt"
-
- "github.com/google/subcommands"
-)
-
-// Usage: signify -C [-q] -p pubkey -x sigfile [file ...]
-
-type checkCommand struct {
- quiet bool
- pubFile string
- sigFile string
-}
-
-func (c *checkCommand) Name() string { return "check" }
-func (c *checkCommand) Synopsis() string { return "check signatures" }
-func (c *checkCommand) Usage() string {
- return "check [-q] -p pubkey -x sigfile [file ...]\n"
-}
-
-func (c *checkCommand) SetFlags(f *flag.FlagSet) {
- f.BoolVar(&c.quiet, "q", false, "quiet mode")
- f.StringVar(&c.pubFile, "p", "", "public key file (required)")
- f.StringVar(&c.sigFile, "x", "", "signature file (required)")
-}
-
-func (c *checkCommand) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus {
- if c.pubFile == "" || c.sigFile == "" {
- f.Usage()
- return subcommands.ExitUsageError
- }
- files := make([]string, f.NArg())
- for i := 0; i < f.NArg(); i++ {
- files[i] = f.Arg(i)
- }
- fmt.Println(files)
- // TODO
- return subcommands.ExitSuccess
-}