aboutsummaryrefslogtreecommitdiff
path: root/check.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-02-13 01:22:10 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-02-13 01:22:10 +0100
commit8bb62c061174bc9098d7ccf1b6772783f1336ba9 (patch)
treebc2bcddefe55e52b931924664617b0df5b1f9e48 /check.go
parentc32d9bf24c3b670c3a56ea55aeefb6232f3d4ec8 (diff)
combine
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
-}