Returns the value of a string flag (either parent or local scope)
(c *cli.Context, flag cli.Flag)
| 1205 | |
| 1206 | // Returns the value of a string flag (either parent or local scope) |
| 1207 | func 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) |
| 1216 | func parseIntFlag(c *cli.Context, flag cli.IntFlag) int { |
no test coverage detected