Shift supported go versions

and approve word-wrapping changes to godoc
This commit is contained in:
Dan Buch 2022-08-14 10:31:53 -04:00
parent e3ee4fb3ef
commit 27b456971b
Signed by: meatballhat
GPG Key ID: A12F782281063434
4 changed files with 56 additions and 55 deletions

View File

@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: [1.16.x, 1.17.x, 1.18.x]
go: [1.17.x, 1.18.x, 1.19.x]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@v3
- name: GOFMT Check
if: matrix.go == '1.18.x' && matrix.os == 'ubuntu-latest'
if: matrix.go == '1.19.x' && matrix.os == 'ubuntu-latest'
run: test -z $(gofmt -l .)
- name: vet
@ -50,7 +50,7 @@ jobs:
run: go run internal/build/build.go -tags urfave_cli_no_docs check-binary-size
- name: Upload coverage to Codecov
if: success() && matrix.go == '1.18.x' && matrix.os == 'ubuntu-latest'
if: success() && matrix.go == '1.19.x' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
@ -62,7 +62,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.19.x
- name: Use Node.js 16
uses: actions/setup-node@v3

11
.gitignore vendored
View File

@ -1,10 +1,11 @@
*.coverprofile
*.exe
*.orig
vendor
.*envrc
.envrc
.idea
internal/*/built-example
coverage.txt
/.local/
/site/
*.exe
coverage.txt
internal/*/built-example
vendor

View File

@ -64,8 +64,8 @@ GLOBAL OPTIONS:
COPYRIGHT:
{{wrap .Copyright 3}}{{end}}
`
AppHelpTemplate is the text template for the Default help topic. cli.go uses
text/template to render templates. You can render custom help text by
AppHelpTemplate is the text template for the Default help topic. cli.go
uses text/template to render templates. You can render custom help text by
setting this variable.
var CommandHelpTemplate = `NAME:
@ -201,9 +201,9 @@ func DefaultAppComplete(cCtx *Context)
func DefaultCompleteWithFlags(cmd *Command) func(cCtx *Context)
func FlagNames(name string, aliases []string) []string
func HandleAction(action interface{}, cCtx *Context) (err error)
HandleAction attempts to figure out which Action signature was used. If it's
an ActionFunc or a func with the legacy signature for Action, the func is
run!
HandleAction attempts to figure out which Action signature was used.
If it's an ActionFunc or a func with the legacy signature for Action,
the func is run!
func HandleExitCoder(err error)
HandleExitCoder handles errors implementing ExitCoder by printing their
@ -360,14 +360,14 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error)
to generate command-specific flags
func (a *App) RunContext(ctx context.Context, arguments []string) (err error)
RunContext is like Run except it takes a Context that will be passed to its
commands and sub-commands. Through this, you can propagate timeouts and
RunContext is like Run except it takes a Context that will be passed to
its commands and sub-commands. Through this, you can propagate timeouts and
cancellation requests
func (a *App) Setup()
Setup runs initialization code to ensure all data structures are ready for
`Run` or inspection prior to `Run`. It is internally called by `Run`, but
will return early if setup has already happened.
Setup runs initialization code to ensure all data structures are ready
for `Run` or inspection prior to `Run`. It is internally called by `Run`,
but will return early if setup has already happened.
func (a *App) ToFishCompletion() (string, error)
ToFishCompletion creates a fish completion string for the `*App` The
@ -799,9 +799,9 @@ func Exit(message interface{}, exitCode int) ExitCoder
Exit wraps a message and exit code into an error, which by default is
handled with a call to os.Exit during default error handling.
This is the simplest way to trigger a non-zero exit code for an App without
having to call os.Exit manually. During testing, this behavior can be
avoided by overiding the ExitErrHandler function on an App or the
This is the simplest way to trigger a non-zero exit code for an App
without having to call os.Exit manually. During testing, this behavior
can be avoided by overiding the ExitErrHandler function on an App or the
package-global OsExiter function.
func NewExitError(message interface{}, exitCode int) ExitCoder
@ -1431,8 +1431,8 @@ type MultiInt64Flag = SliceFlag[*Int64SliceFlag, []int64, int64]
directly, as Value and/or Destination. See also SliceFlag.
type MultiIntFlag = SliceFlag[*IntSliceFlag, []int, int]
MultiIntFlag extends IntSliceFlag with support for using slices directly, as
Value and/or Destination. See also SliceFlag.
MultiIntFlag extends IntSliceFlag with support for using slices directly,
as Value and/or Destination. See also SliceFlag.
type MultiStringFlag = SliceFlag[*StringSliceFlag, []string, string]
MultiStringFlag extends StringSliceFlag with support for using slices
@ -1513,8 +1513,8 @@ type RequiredFlag interface {
IsRequired() bool
}
RequiredFlag is an interface that allows us to mark flags as required it
allows flags required flags to be backwards compatible with the Flag
RequiredFlag is an interface that allows us to mark flags as required
it allows flags required flags to be backwards compatible with the Flag
interface
type Serializer interface {
@ -1527,9 +1527,9 @@ type SliceFlag[T SliceFlagTarget[E], S ~[]E, E any] struct {
Value S
Destination *S
}
SliceFlag extends implementations like StringSliceFlag and IntSliceFlag with
support for using slices directly, as Value and/or Destination. See also
SliceFlagTarget, MultiStringFlag, MultiFloat64Flag, MultiInt64Flag,
SliceFlag extends implementations like StringSliceFlag and IntSliceFlag
with support for using slices directly, as Value and/or Destination.
See also SliceFlagTarget, MultiStringFlag, MultiFloat64Flag, MultiInt64Flag,
MultiIntFlag.
func (x *SliceFlag[T, S, E]) Apply(set *flag.FlagSet) error
@ -1986,9 +1986,9 @@ func InitInputSource(flags []cli.Flag, createInputSource func() (InputSourceCont
that are supported by the input source
func InitInputSourceWithContext(flags []cli.Flag, createInputSource func(cCtx *cli.Context) (InputSourceContext, error)) cli.BeforeFunc
InitInputSourceWithContext is used to to setup an InputSourceContext on a
cli.Command Before method. It will create a new input source based on the
func provided with potentially using existing cli.Context values to
InitInputSourceWithContext is used to to setup an InputSourceContext on
a cli.Command Before method. It will create a new input source based on
the func provided with potentially using existing cli.Context values to
initialize itself. If there is no error it will then apply the new input
source to any flags that are supported by the input source

View File

@ -64,8 +64,8 @@ GLOBAL OPTIONS:
COPYRIGHT:
{{wrap .Copyright 3}}{{end}}
`
AppHelpTemplate is the text template for the Default help topic. cli.go uses
text/template to render templates. You can render custom help text by
AppHelpTemplate is the text template for the Default help topic. cli.go
uses text/template to render templates. You can render custom help text by
setting this variable.
var CommandHelpTemplate = `NAME:
@ -201,9 +201,9 @@ func DefaultAppComplete(cCtx *Context)
func DefaultCompleteWithFlags(cmd *Command) func(cCtx *Context)
func FlagNames(name string, aliases []string) []string
func HandleAction(action interface{}, cCtx *Context) (err error)
HandleAction attempts to figure out which Action signature was used. If it's
an ActionFunc or a func with the legacy signature for Action, the func is
run!
HandleAction attempts to figure out which Action signature was used.
If it's an ActionFunc or a func with the legacy signature for Action,
the func is run!
func HandleExitCoder(err error)
HandleExitCoder handles errors implementing ExitCoder by printing their
@ -360,14 +360,14 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error)
to generate command-specific flags
func (a *App) RunContext(ctx context.Context, arguments []string) (err error)
RunContext is like Run except it takes a Context that will be passed to its
commands and sub-commands. Through this, you can propagate timeouts and
RunContext is like Run except it takes a Context that will be passed to
its commands and sub-commands. Through this, you can propagate timeouts and
cancellation requests
func (a *App) Setup()
Setup runs initialization code to ensure all data structures are ready for
`Run` or inspection prior to `Run`. It is internally called by `Run`, but
will return early if setup has already happened.
Setup runs initialization code to ensure all data structures are ready
for `Run` or inspection prior to `Run`. It is internally called by `Run`,
but will return early if setup has already happened.
func (a *App) ToFishCompletion() (string, error)
ToFishCompletion creates a fish completion string for the `*App` The
@ -799,9 +799,9 @@ func Exit(message interface{}, exitCode int) ExitCoder
Exit wraps a message and exit code into an error, which by default is
handled with a call to os.Exit during default error handling.
This is the simplest way to trigger a non-zero exit code for an App without
having to call os.Exit manually. During testing, this behavior can be
avoided by overiding the ExitErrHandler function on an App or the
This is the simplest way to trigger a non-zero exit code for an App
without having to call os.Exit manually. During testing, this behavior
can be avoided by overiding the ExitErrHandler function on an App or the
package-global OsExiter function.
func NewExitError(message interface{}, exitCode int) ExitCoder
@ -1431,8 +1431,8 @@ type MultiInt64Flag = SliceFlag[*Int64SliceFlag, []int64, int64]
directly, as Value and/or Destination. See also SliceFlag.
type MultiIntFlag = SliceFlag[*IntSliceFlag, []int, int]
MultiIntFlag extends IntSliceFlag with support for using slices directly, as
Value and/or Destination. See also SliceFlag.
MultiIntFlag extends IntSliceFlag with support for using slices directly,
as Value and/or Destination. See also SliceFlag.
type MultiStringFlag = SliceFlag[*StringSliceFlag, []string, string]
MultiStringFlag extends StringSliceFlag with support for using slices
@ -1513,8 +1513,8 @@ type RequiredFlag interface {
IsRequired() bool
}
RequiredFlag is an interface that allows us to mark flags as required it
allows flags required flags to be backwards compatible with the Flag
RequiredFlag is an interface that allows us to mark flags as required
it allows flags required flags to be backwards compatible with the Flag
interface
type Serializer interface {
@ -1527,9 +1527,9 @@ type SliceFlag[T SliceFlagTarget[E], S ~[]E, E any] struct {
Value S
Destination *S
}
SliceFlag extends implementations like StringSliceFlag and IntSliceFlag with
support for using slices directly, as Value and/or Destination. See also
SliceFlagTarget, MultiStringFlag, MultiFloat64Flag, MultiInt64Flag,
SliceFlag extends implementations like StringSliceFlag and IntSliceFlag
with support for using slices directly, as Value and/or Destination.
See also SliceFlagTarget, MultiStringFlag, MultiFloat64Flag, MultiInt64Flag,
MultiIntFlag.
func (x *SliceFlag[T, S, E]) Apply(set *flag.FlagSet) error
@ -1986,9 +1986,9 @@ func InitInputSource(flags []cli.Flag, createInputSource func() (InputSourceCont
that are supported by the input source
func InitInputSourceWithContext(flags []cli.Flag, createInputSource func(cCtx *cli.Context) (InputSourceContext, error)) cli.BeforeFunc
InitInputSourceWithContext is used to to setup an InputSourceContext on a
cli.Command Before method. It will create a new input source based on the
func provided with potentially using existing cli.Context values to
InitInputSourceWithContext is used to to setup an InputSourceContext on
a cli.Command Before method. It will create a new input source based on
the func provided with potentially using existing cli.Context values to
initialize itself. If there is no error it will then apply the new input
source to any flags that are supported by the input source