From 8bb62c061174bc9098d7ccf1b6772783f1336ba9 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 13 Feb 2018 01:22:10 +0100 Subject: combine --- check.go | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 check.go (limited to 'check.go') 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 -} -- cgit v1.2.3