MCPcopy
hub / github.com/urfave/cli / Int64

Method Int64

flag_int.go:91–93  ·  view source on GitHub ↗

Int64 looks up the value of a local Int64Flag, returns 0 if not found

(name string)

Source from the content-addressed store, hash-verified

89// Int64 looks up the value of a local Int64Flag, returns
90// 0 if not found
91func (cmd *Command) Int64(name string) int64 {
92 return getInt[int64](cmd, name)
93}
94
95func getInt[T int | int8 | int16 | int32 | int64](cmd *Command, name string) T {
96 if v, ok := cmd.Value(name).(T); ok {

Callers 9

TestInt64FlagFunction · 0.95
TestCommand_IntFunction · 0.95
TestCommand_SetFunction · 0.95
TestCommandInvalidNameFunction · 0.95
TestParseMultiIntFunction · 0.80
TestParseMultiIntFromEnvFunction · 0.80

Calls

no outgoing calls

Tested by 9

TestInt64FlagFunction · 0.76
TestCommand_IntFunction · 0.76
TestCommand_SetFunction · 0.76
TestCommandInvalidNameFunction · 0.76
TestParseMultiIntFunction · 0.64
TestParseMultiIntFromEnvFunction · 0.64