Commit Graph

852 Commits

Author SHA1 Message Date
Jake Champlin
c8d66d7eda
Lowercase TOC to pass tests 2016-08-30 11:12:22 -04:00
Jake Champlin
51cebd042a
Update TOC in README 2016-08-30 10:56:28 -04:00
Jake Champlin
33b5174be4 Merge branch 'v2' into f-default-value-text 2016-08-30 10:53:16 -04:00
Jake Champlin
7d56512ecc
Add documentation, remove quotes by default 2016-08-30 10:52:24 -04:00
Jesse Szwedko
2616eeb540 Merge pull request #512 from grubernaut/f-update-altsrc-import-v2
Update altsrc imports to gopkg.in
2016-08-28 13:23:17 -07:00
Jake Champlin
e0556cf9e8
Add DefaultValue text for flags
Allows a user to override the default value of a flag in the displayed help output.

Ex:
```
cli.IntFlag{
	Name: "foo, f",
	DefaultText: "random foo",
	Value: "bar",
}
```

Running `(app.name) -h` will now yield:

```
--foo value     (default: "random foo")
```

Fixes: #504
2016-08-28 03:14:39 -04:00
Jake Champlin
2ab83fab2a
Force generation of flag types to use gopkg import 2016-08-28 01:36:49 -04:00
Jake Champlin
b93207160f
Update altsrc imports to gopkg.in
Updates altsrc imports to use `gopkg.in/urfave/cli.v2`

Fixes: #505
2016-08-27 19:14:15 -04:00
a095a5a896 Merge pull request #506 from grubernaut/v2
Abstract dependency and test execution with Makefile
2016-08-26 09:56:24 -04:00
Jake Champlin
3a3228c0e4
Abstract dependency and test execution with Makefile
Abstract the `runtests` script with a makefile, and update travis tests to use makefile abstraction.
2016-08-26 08:34:05 -04:00
adf6897aa2 Merge pull request #509 from urfave/merging-from-v1
Merging from v1
2016-08-23 11:25:16 -04:00
Dan Buch
812fa64d8e
Skip migrations on go < 1.3
because there won't be a `gfmrun` around to extract examples
2016-08-22 17:54:51 -04:00
Dan Buch
87f9c6d44a
Merge remote-tracking branch 'origin/master' into merging-from-v1 2016-08-22 17:47:11 -04:00
207bb61852 Merge pull request #510 from urfave/skip-gfmrun-below-go1.3
Skip gfmrun installation and tests below go1.3
2016-08-22 15:54:13 -04:00
Dan Buch
c0cf41eb54
Skip gfmrun installation and tests below go1.3 2016-08-22 15:26:33 -04:00
Dan Buch
c5d3a341c4
Adjust some gfmrun output matches
which I assume became mismatched during merge
2016-08-22 14:56:38 -04:00
Dan Buch
81c242dda6
Merge remote-tracking branch 'origin/master' into merging-from-v1 2016-08-22 14:41:56 -04:00
Jesse Szwedko
168c95418e Ensure that EnvVar struct field exists before interrogating it
Otherwise you end up with `<invalid Value>` which, in practice, would
probably work, but this is cleaner.
2016-07-31 20:11:16 -07:00
d60469024a Merge pull request #502 from urfave/fix-is-set-for-env
Fix context.(Global)IsSet to respect environment variables
2016-07-31 23:06:54 -04:00
Jesse Szwedko
6c1f51aa95 Fix context.(Global)IsSet to respect environment variables
This appeared to be the least messy approach to hack in support for
IsSet also checking environment variables to see if a particular
cli.Flag was set without making backwards incompatible changes to the
interface.

I intend to fix this more properly in v2, probably by adding another
method to the cli.Flag interface to push the responsibility down as it
occurred to me that it was really the `Flag`s themselves that offer
support for configuration via the environment as opposed to the
`context` or other supporting structures. This opens the door for the
anything implementing the `Flag` interface to have additional sources of
input while still supporting `context.IsSet`.
2016-07-31 14:14:46 -07:00
Jesse Szwedko
b616f60886 Note TOML support in README and CHANGELOG 2016-07-31 12:11:52 -07:00
Jesse Szwedko
a71fcd8f23 Merge pull request #491 from ykanda/toml-support
Add TOML config file loader
2016-07-31 12:06:35 -07:00
kandayasu
af0ac0f1f3 Merge branch 'master' into toml-support 2016-07-26 16:04:44 +09:00
Jesse Szwedko
d9021faab6 Merge pull request #500 from npcode/readme-remove-v
README: Remove unnecessary 'v' from version numbers
2016-07-25 18:14:03 -07:00
kandayasu
36b7d89bed Fix typo 2016-07-26 01:37:18 +09:00
kandayasu
812de9e250 type "TomlMap" to private (rename TomlMap -> tomlMap) 2016-07-26 01:37:03 +09:00
Yi EungJun
c59ec842c1 README: Remove unnecessary 'v' from version numbers
'partay version v19.99.0' sounds 'partay version version 19.99.0'
because 'v' stands for 'version'.
2016-07-25 23:44:02 +09:00
e43a9fbf1e Merge pull request #497 from urfave/error-behavior-changelog-mention
Refine error handling behavior
2016-07-24 14:53:24 -04:00
kandayasu
dd7cc7a6d2 Merge branch 'master' into toml-support 2016-07-25 02:47:48 +09:00
Dan Buch
e9688813e4
Refine error handling behavior
so that exit 1 happens as long as error is non-nil
2016-07-24 12:09:05 -04:00
8ae5b3d5e2 Merge pull request #496 from urfave/write-non-nil-error-message-exit-nonzero
Write err to stderr, exit 1 if err != ""
2016-07-24 12:06:30 -04:00
Dan Buch
dd253d122c
Write err to stderr, exit 1 if err != ""
Closes #475
2016-07-24 11:57:51 -04:00
ee2e8aa5b2 Merge pull request #495 from urfave/context-lookup-fix-487
Ensure context lookups traverse lineage
2016-07-24 11:17:30 -04:00
Dan Buch
ca2a0f72bf
Ensure context lookups traverse lineage
Closes #487
2016-07-23 21:53:55 -04:00
492afb9149 Merge pull request #494 from urfave/bump-tested-versions
Bump tested go versions
2016-07-23 18:33:46 -04:00
Dan Buch
76fb6d2ab7
Pin testing on go 1.4.2
since 1.4.3 is lacking `vet`
2016-07-23 18:16:45 -04:00
Dan Buch
71a99921b4
Bump tested go versions
and (maybe?) take advantage of support for N.x version syntax
2016-07-23 17:52:19 -04:00
924956d859 Merge pull request #493 from urfave/merging-from-v1
Merging from v1
2016-07-23 15:04:28 -04:00
Dan Buch
c360161d62
Merge remote-tracking branch 'origin/v1' into merging-from-v1 2016-07-23 14:52:58 -04:00
383ad23a88 Merge pull request #492 from urfave/goimports-iff-available
Ignore failed goimports installs
2016-07-23 14:52:09 -04:00
Dan Buch
8d4b6abc2b
Ignore failed goimports installs
since we only use it with go versions >= 1.5 anyway
2016-07-23 14:39:14 -04:00
Yasuhiro KANDA
3fc3cd6485 Add TOML config file loader 2016-07-24 01:35:11 +09:00
Jesse Szwedko
9646e60b1a Merge pull request #484 from urfave/flake8-typegen
Run flake8 checks on generate-flag-types
2016-07-20 19:45:29 -07:00
af4aa82398 Merge branch 'v2' into flake8-typegen 2016-07-16 12:47:30 -04:00
215f2422ff Merge pull request #486 from urfave/merging-from-v1
Merging from v1
2016-07-16 12:47:21 -04:00
Dan Buch
67cf919419
Fix some trailing gfmxr refs 2016-07-16 12:24:16 -04:00
Dan Buch
d3b67339c5
Merge remote-tracking branch 'origin/v1' into merging-from-v1 2016-07-16 12:15:38 -04:00
11c134509d Merge pull request #485 from urfave/switch-to-gfmrun
Switch to renamed gfmrun tool
2016-07-16 12:11:36 -04:00
Dan Buch
2c1fd1510c
Switch to renamed gfmrun tool 2016-07-16 09:12:42 -04:00
Dan Buch
a51cb870fb
Wrap a long line for flake8 2016-07-15 21:49:55 -04:00