MCPcopy Create free account
hub / github.com/CPChain/chain / GetFirstStringArgument

Function GetFirstStringArgument

tools/contract-admin/utils/utils.go:57–64  ·  view source on GitHub ↗

GetFirstStringArgument returns the value of the first string argument

(ctx *cli.Context)

Source from the content-addressed store, hash-verified

55
56// GetFirstStringArgument returns the value of the first string argument
57func 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
66func GetFirstTwoIntArgument(ctx *cli.Context) (int64, int64) {
67 if ctx.NArg() != 2 {

Callers

nothing calls this directly

Calls 2

FatalMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected