GetFirstStringArgument returns the value of the first string argument
(ctx *cli.Context)
| 55 | |
| 56 | // GetFirstStringArgument returns the value of the first string argument |
| 57 | func GetFirstStringArgument(ctx *cli.Context) string { |
| 58 | if ctx.NArg() != 1 { |
| 59 | log.Fatal("Invalid length of arguments", "want", 1, "got", ctx.NArg()) |
| 60 | } |
| 61 | |
| 62 | arg := ctx.Args().Get(0) |
| 63 | return arg |
| 64 | } |
| 65 | |
| 66 | func GetFirstTwoIntArgument(ctx *cli.Context) (int64, int64) { |
| 67 | if ctx.NArg() != 2 { |