Figure out which thing to do and then do that
()
| 61 | |
| 62 | // Figure out which thing to do and then do that |
| 63 | func start() error { |
| 64 | switch { |
| 65 | case *flagSign != "": |
| 66 | return signToken() |
| 67 | case *flagVerify != "": |
| 68 | return verifyToken() |
| 69 | case *flagShow != "": |
| 70 | return showToken() |
| 71 | default: |
| 72 | flag.Usage() |
| 73 | return fmt.Errorf("none of the required flags are present. What do you want me to do?") |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | // Helper func: Read input from specified file or stdin |
| 78 | func loadData(p string) (_ []byte, retErr error) { |
no test coverage detected