Merge branch 'master' into toml-support
This commit is contained in:
commit
af0ac0f1f3
@ -5,6 +5,7 @@
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- Flag type code generation via `go generate`
|
||||
- Write to stderr and exit 1 if action returns non-nil error
|
||||
|
||||
### Changed
|
||||
- Raise minimum tested/supported Go version to 1.2+
|
||||
|
10
README.md
10
README.md
@ -953,7 +953,7 @@ setting `cli.VersionFlag`, e.g.:
|
||||
|
||||
<!-- {
|
||||
"args": ["--print-version"],
|
||||
"output": "partay version v19\\.99\\.0"
|
||||
"output": "partay version 19\\.99\\.0"
|
||||
} -->
|
||||
``` go
|
||||
package main
|
||||
@ -972,7 +972,7 @@ func main() {
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "partay"
|
||||
app.Version = "v19.99.0"
|
||||
app.Version = "19.99.0"
|
||||
app.Run(os.Args)
|
||||
}
|
||||
```
|
||||
@ -981,7 +981,7 @@ Alternatively, the version printer at `cli.VersionPrinter` may be overridden, e.
|
||||
|
||||
<!-- {
|
||||
"args": ["--version"],
|
||||
"output": "version=v19\\.99\\.0 revision=fafafaf"
|
||||
"output": "version=19\\.99\\.0 revision=fafafaf"
|
||||
} -->
|
||||
``` go
|
||||
package main
|
||||
@ -1004,7 +1004,7 @@ func main() {
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "partay"
|
||||
app.Version = "v19.99.0"
|
||||
app.Version = "19.99.0"
|
||||
app.Run(os.Args)
|
||||
}
|
||||
```
|
||||
@ -1083,7 +1083,7 @@ func (g *genericType) String() string {
|
||||
func main() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "kənˈtrīv"
|
||||
app.Version = "v19.99.0"
|
||||
app.Version = "19.99.0"
|
||||
app.Compiled = time.Now()
|
||||
app.Authors = []cli.Author{
|
||||
cli.Author{
|
||||
|
@ -93,6 +93,6 @@ func HandleExitCoder(err error) {
|
||||
|
||||
if err.Error() != "" {
|
||||
fmt.Fprintln(ErrWriter, err)
|
||||
}
|
||||
OsExiter(1)
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ func TestHandleExitCoder_ErrorWithoutMessage(t *testing.T) {
|
||||
err := errors.New("")
|
||||
HandleExitCoder(err)
|
||||
|
||||
expect(t, exitCode, 0)
|
||||
expect(t, called, false)
|
||||
expect(t, exitCode, 1)
|
||||
expect(t, called, true)
|
||||
expect(t, ErrWriter.(*bytes.Buffer).String(), "")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user