Dan Buch
a0e694ed72
Add UintFlag, Uint64Flag types and supporting code
8 years ago
Dan Buch
537f5beb66
Tweaks to Int64Flag PR
8 years ago
Bruno França dos Reis
80d3d863d9
Adding Int64 and GlobalInt64 in context, plus related tests
8 years ago
Matt Farina
2f4ec31264
Fixed spelling and gofmt issues
8 years ago
Jesse Szwedko
e3ace79a91
Add GlobalBoolT
...
Fixes #206
8 years ago
Dan Buch
e059dc8188
Implement *Context.GlobalSet + relevant CHANGELOG entry
9 years ago
Dan Buch
4edb5c9a6b
Merge branch 'bryanl-set-context-values' of https://github.com/bryanl/cli into bryanl-bryanl-set-context-values
9 years ago
Dan Buch
4cae17cfe1
Ensure MultiError returned when both Before and After funcs given
9 years ago
Dan Buch
61d4175525
Merge remote-tracking branch 'origin/master' into txgruppi-develop
9 years ago
Dan Buch
2c0e13ecf8
Revising/adding tests that assert order of operations inside App.Run
9 years ago
Dan Buch
bd0f13d022
Add Context.GlobalFloat64 plus tests
...
Closes #362
9 years ago
Omer Murat Yildirim
802f64479d
Add NArg method to context structure
9 years ago
Edward Sheffler III
8ea1232ede
Improve vendoring options by removing self-referential imports in tests.
9 years ago
bryanl
a3b93076ff
Allow context value to be set after parse
...
This change allows a context value to be set after parsing. The use case is updating default settings in a Before func.
An example usage:
```
f, err := os.Open(configPath)
if err == nil {
config, err := docli.NewConfig(f)
if err != nil {
panic(err)
}
c.Set("token", config.APIKey)
}
```
9 years ago
Fabian Ruff
65d50017d4
search context hierachy for global flags
9 years ago
Ravi Gadde
bcec9b08c7
Added an API and test case for number of flags set
10 years ago
Jesse Howarth
a6bafbe9a5
Add additional test
10 years ago
Jesse Howarth
b490b5e35d
Add a function to determine if a global flag is set.
10 years ago
Ghislain Gt
98af61a59f
Add time.Duration flag type
10 years ago
Chris Winslett
c69522c960
Make Command accessible from Context
11 years ago
Yicheng Qin
5903a0a844
Add BoolTFlag type
...
Compared to BoolFlag type, BoolTFlag treats 'true' as the default value
for the flag.
Without it, we have to use --no-action flag if we set the action is done
in default. But sometimes it is bad to maintain flags with negative meanings.
And it will be painful if we change the default value for the flag.
As this implementation, it keeps all existing functionality. So it
is compatible with old versions.
11 years ago
fraenkel
f88df0aa5a
Allow optional flags by asking if its been set/present on the command line
11 years ago
Jeremy Saenz
70eacca641
JMS #25 : Added support for help flags
11 years ago
Jeremy Saenz
e14e45d087
More test tweaking
11 years ago
Jeremy Saenz
6664835bc1
JMS #14 : Moving toward having and app object
11 years ago
Jeremy Saenz
59b0ce24ef
JMS #4 : Support for global flags in cli.Context
11 years ago
Jeremy Saenz
3119b075d6
JMS #4 : Flag testing
11 years ago
Jeremy Saenz
3f76896c4f
JMS #4 : Getting some cli tests going. Testing out flags
11 years ago
Jeremy Saenz
6f22315082
JMS #4 : Parsing command flags with context
11 years ago