blob: 78c1e669841fcb29ac751180d37a323545ab0530 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package main
import (
"flag"
"fmt"
)
// Usage: signify -C [-q] -p pubkey -x sigfile [file ...]
func check(args []string) error {
opts := flag.NewFlagSet("check", flag.ExitOnError)
var (
quiet = opts.Bool("q", false, "Quiet mode")
pubFile = opts.String("p", "", "Public key file (required)")
sigFile = opts.String("x", "", "Signature file (required)")
)
opts.Parse(args)
if *pubFile == "" || *sigFile == "" {
opts.Usage()
return nil
}
files := make([]string, opts.NArg())
for i := 0; i < opts.NArg(); i++ {
files[i] = opts.Arg(i)
}
fmt.Println(files)
_, _, _ = quiet, pubFile, sigFile // TODO
return nil
}
|