MCPcopy
hub / github.com/golang-jwt/jwt / main

Function main

cmd/jwt/main.go:39–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37)
38
39func main() {
40 // Plug in Var flags
41 flag.Var(flagClaims, "claim", "add additional claims. may be used more than once")
42 flag.Var(flagHead, "header", "add additional header params. may be used more than once")
43
44 // Usage message if you ask for -help or if you mess up inputs.
45 flag.Usage = func() {
46 fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
47 fmt.Fprintf(os.Stderr, " One of the following flags is required: sign, verify or show\n")
48 flag.PrintDefaults()
49 }
50
51 // Parse command line options
52 flag.Parse()
53
54 // Do the thing. If something goes wrong, print error to stderr
55 // and exit with a non-zero status code
56 if err := start(); err != nil {
57 fmt.Fprintf(os.Stderr, "Error: %v\n", err)
58 os.Exit(1)
59 }
60}
61
62// Figure out which thing to do and then do that
63func start() error {

Callers

nothing calls this directly

Calls 2

startFunction · 0.85
ParseMethod · 0.80

Tested by

no test coverage detected