Merge branch 'master' into master
This commit is contained in:
commit
5dc55f2287
25
.travis.yml
25
.travis.yml
@ -1,28 +1,17 @@
|
|||||||
language: go
|
language: go
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
dist: trusty
|
||||||
|
osx_image: xcode8.3
|
||||||
|
go: 1.8.x
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
|
||||||
go:
|
|
||||||
- 1.6.x
|
|
||||||
- 1.7.x
|
|
||||||
- 1.8.x
|
|
||||||
- master
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- go: master
|
|
||||||
include:
|
|
||||||
- go: 1.6.x
|
|
||||||
os: osx
|
|
||||||
- go: 1.7.x
|
|
||||||
os: osx
|
|
||||||
- go: 1.8.x
|
|
||||||
os: osx
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- go get github.com/urfave/gfmrun/... || true
|
- go get github.com/urfave/gfmrun/... || true
|
||||||
- go get golang.org/x/tools/cmd/goimports
|
- go get golang.org/x/tools/cmd/goimports
|
||||||
|
43
CHANGELOG.md
43
CHANGELOG.md
@ -4,6 +4,49 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## 1.20.0 - 2017-08-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* `HandleExitCoder` is now correctly iterates over all errors in
|
||||||
|
a `MultiError`. The exit code is the exit code of the last error or `1` if
|
||||||
|
there are no `ExitCoder`s in the `MultiError`.
|
||||||
|
* Fixed YAML file loading on Windows (previously would fail validate the file path)
|
||||||
|
* Subcommand `Usage`, `Description`, `ArgsUsage`, `OnUsageError` correctly
|
||||||
|
propogated
|
||||||
|
* `ErrWriter` is now passed downwards through command structure to avoid the
|
||||||
|
need to redefine it
|
||||||
|
* Pass `Command` context into `OnUsageError` rather than parent context so that
|
||||||
|
all fields are avaiable
|
||||||
|
* Errors occuring in `Before` funcs are no longer double printed
|
||||||
|
* Use `UsageText` in the help templates for commands and subcommands if
|
||||||
|
defined; otherwise build the usage as before (was previously ignoring this
|
||||||
|
field)
|
||||||
|
* `IsSet` and `GlobalIsSet` now correctly return whether a flag is set if
|
||||||
|
a program calls `Set` or `GlobalSet` directly after flag parsing (would
|
||||||
|
previously only return `true` if the flag was set during parsing)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* No longer exit the program on command/subcommand error if the error raised is
|
||||||
|
not an `OsExiter`. This exiting behavior was introduced in 1.19.0, but was
|
||||||
|
determined to be a regression in functionality. See [the
|
||||||
|
PR](https://github.com/urfave/cli/pull/595) for discussion.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* `CommandsByName` type was added to make it easy to sort `Command`s by name,
|
||||||
|
alphabetically
|
||||||
|
* `altsrc` now handles loading of string and int arrays from TOML
|
||||||
|
* Support for definition of custom help templates for `App` via
|
||||||
|
`CustomAppHelpTemplate`
|
||||||
|
* Support for arbitrary key/value fields on `App` to be used with
|
||||||
|
`CustomAppHelpTemplate` via `ExtraInfo`
|
||||||
|
* `HelpFlag`, `VersionFlag`, and `BashCompletionFlag` changed to explictly be
|
||||||
|
`cli.Flag`s allowing for the use of custom flags satisfying the `cli.Flag`
|
||||||
|
interface to be used.
|
||||||
|
|
||||||
|
|
||||||
## [1.19.1] - 2016-11-21
|
## [1.19.1] - 2016-11-21
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
10
README.md
10
README.md
@ -33,6 +33,7 @@ applications in an expressive way.
|
|||||||
+ [Ordering](#ordering)
|
+ [Ordering](#ordering)
|
||||||
+ [Values from the Environment](#values-from-the-environment)
|
+ [Values from the Environment](#values-from-the-environment)
|
||||||
+ [Values from alternate input sources (YAML, TOML, and others)](#values-from-alternate-input-sources-yaml-toml-and-others)
|
+ [Values from alternate input sources (YAML, TOML, and others)](#values-from-alternate-input-sources-yaml-toml-and-others)
|
||||||
|
+ [Precedence](#precedence)
|
||||||
* [Subcommands](#subcommands)
|
* [Subcommands](#subcommands)
|
||||||
* [Subcommands categories](#subcommands-categories)
|
* [Subcommands categories](#subcommands-categories)
|
||||||
* [Exit code](#exit-code)
|
* [Exit code](#exit-code)
|
||||||
@ -656,6 +657,15 @@ func main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Precedence
|
||||||
|
|
||||||
|
The precedence for flag value sources is as follows (highest to lowest):
|
||||||
|
|
||||||
|
0. Command line flag value from user
|
||||||
|
0. Environment variable (if specified)
|
||||||
|
0. Configuration file (if specified)
|
||||||
|
0. Default defined on the flag
|
||||||
|
|
||||||
### Subcommands
|
### Subcommands
|
||||||
|
|
||||||
Subcommands can be defined for a more git-like command line app.
|
Subcommands can be defined for a more git-like command line app.
|
||||||
|
10
appveyor.yml
10
appveyor.yml
@ -1,14 +1,16 @@
|
|||||||
version: "{build}"
|
version: "{build}"
|
||||||
|
|
||||||
os: Windows Server 2012 R2
|
os: Windows Server 2016
|
||||||
|
|
||||||
|
image: Visual Studio 2017
|
||||||
|
|
||||||
clone_folder: c:\gopath\src\github.com\urfave\cli
|
clone_folder: c:\gopath\src\github.com\urfave\cli
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
GOPATH: C:\gopath
|
GOPATH: C:\gopath
|
||||||
GOVERSION: 1.6
|
GOVERSION: 1.8.x
|
||||||
PYTHON: C:\Python27-x64
|
PYTHON: C:\Python36-x64
|
||||||
PYTHON_VERSION: 2.7.x
|
PYTHON_VERSION: 3.6.x
|
||||||
PYTHON_ARCH: 64
|
PYTHON_ARCH: 64
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
Loading…
Reference in New Issue
Block a user