MCPcopy
hub / github.com/NVIDIA/aistore / parseStrFlag

Function parseStrFlag

cmd/cli/commands/utils.go:1207–1213  ·  view source on GitHub ↗

Returns the value of a string flag (either parent or local scope)

(c *cli.Context, flag cli.Flag)

Source from the content-addressed store, hash-verified

1205
1206// Returns the value of a string flag (either parent or local scope)
1207func parseStrFlag(c *cli.Context, flag cli.Flag) string {
1208 flagName := cleanFlag(flag.GetName())
1209 if c.GlobalIsSet(flagName) {
1210 return c.GlobalString(flagName)
1211 }
1212 return c.String(flagName)
1213}
1214
1215// Returns the value of an int flag (either parent or local scope)
1216func parseIntFlag(c *cli.Context, flag cli.IntFlag) int {

Callers 15

fullBckCopyFunction · 0.85
copyBucketHandlerFunction · 0.85
searchCmdHdlrFunction · 0.85
joinNodeHandlerFunction · 0.85
parseBckPropsFromContextFunction · 0.85
parseByteFlagToIntFunction · 0.85
parseChecksumFlagsFunction · 0.85
cliAuthnUserPasswordFunction · 0.85
loginUserHandlerFunction · 0.85
showAuthAllRolesFunction · 0.85
addOrUpdateRoleFunction · 0.85
tokfileFunction · 0.85

Calls 2

cleanFlagFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected