From 93a3190684f72014909da62d8b595088b92cbb6f Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 12 Sep 2022 07:51:51 -0400 Subject: [PATCH] Bump declared module and internal usage to `/v3/` --- README.md | 2 +- altsrc/flag.go | 2 +- altsrc/flag_generated.go | 2 +- altsrc/flag_test.go | 2 +- altsrc/input_source_context.go | 2 +- altsrc/json_command_test.go | 2 +- altsrc/json_source_context.go | 2 +- altsrc/map_input_source.go | 2 +- altsrc/toml_command_test.go | 2 +- altsrc/toml_file_loader.go | 2 +- altsrc/yaml_command_test.go | 2 +- altsrc/yaml_file_loader.go | 2 +- altsrc/yaml_file_loader_test.go | 4 ++-- go.mod | 4 ++-- go.sum | 4 ---- godoc-current.txt | 4 ++-- internal/build/build.go | 6 +++--- internal/example-cli/example-cli.go | 2 +- internal/genflags/cmd/genflags/main.go | 4 ++-- internal/genflags/package_test.go | 2 +- internal/genflags/spec_test.go | 2 +- zz_generated.flags_test.go | 2 +- 22 files changed, 27 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index eaed356..3ac693b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # cli -[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://pkg.go.dev/github.com/urfave/cli/v2) +[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://pkg.go.dev/github.com/urfave/cli/v3) [![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli) [![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli) [![codecov](https://codecov.io/gh/urfave/cli/branch/main/graph/badge.svg)](https://codecov.io/gh/urfave/cli) diff --git a/altsrc/flag.go b/altsrc/flag.go index db95949..cf85072 100644 --- a/altsrc/flag.go +++ b/altsrc/flag.go @@ -6,7 +6,7 @@ import ( "strconv" "syscall" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) // FlagInputSourceExtension is an extension interface of cli.Flag that diff --git a/altsrc/flag_generated.go b/altsrc/flag_generated.go index c9ecea8..8e5c9c0 100644 --- a/altsrc/flag_generated.go +++ b/altsrc/flag_generated.go @@ -5,7 +5,7 @@ package altsrc import ( "flag" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) // BoolFlag is the flag type that wraps cli.BoolFlag to allow diff --git a/altsrc/flag_test.go b/altsrc/flag_test.go index e3725f7..3c496e5 100644 --- a/altsrc/flag_test.go +++ b/altsrc/flag_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) type testApplyInputSource struct { diff --git a/altsrc/input_source_context.go b/altsrc/input_source_context.go index d743253..e106f7b 100644 --- a/altsrc/input_source_context.go +++ b/altsrc/input_source_context.go @@ -3,7 +3,7 @@ package altsrc import ( "time" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) // InputSourceContext is an interface used to allow diff --git a/altsrc/json_command_test.go b/altsrc/json_command_test.go index bd0022b..22c5958 100644 --- a/altsrc/json_command_test.go +++ b/altsrc/json_command_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) const ( diff --git a/altsrc/json_source_context.go b/altsrc/json_source_context.go index 168b6da..43eaef8 100644 --- a/altsrc/json_source_context.go +++ b/altsrc/json_source_context.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) // NewJSONSourceFromFlagFunc returns a func that takes a cli.Context diff --git a/altsrc/map_input_source.go b/altsrc/map_input_source.go index 07de00f..acea2e6 100644 --- a/altsrc/map_input_source.go +++ b/altsrc/map_input_source.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) // MapInputSource implements InputSourceContext to return diff --git a/altsrc/toml_command_test.go b/altsrc/toml_command_test.go index b9c7982..ba3b614 100644 --- a/altsrc/toml_command_test.go +++ b/altsrc/toml_command_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) func TestCommandTomFileTest(t *testing.T) { diff --git a/altsrc/toml_file_loader.go b/altsrc/toml_file_loader.go index dfc9b7b..0e614e3 100644 --- a/altsrc/toml_file_loader.go +++ b/altsrc/toml_file_loader.go @@ -5,7 +5,7 @@ import ( "reflect" "github.com/BurntSushi/toml" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) type tomlMap struct { diff --git a/altsrc/yaml_command_test.go b/altsrc/yaml_command_test.go index 298e4d7..0009332 100644 --- a/altsrc/yaml_command_test.go +++ b/altsrc/yaml_command_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) func TestCommandYamlFileTest(t *testing.T) { diff --git a/altsrc/yaml_file_loader.go b/altsrc/yaml_file_loader.go index 315db18..66afe58 100644 --- a/altsrc/yaml_file_loader.go +++ b/altsrc/yaml_file_loader.go @@ -9,7 +9,7 @@ import ( "runtime" "strings" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "gopkg.in/yaml.v3" ) diff --git a/altsrc/yaml_file_loader_test.go b/altsrc/yaml_file_loader_test.go index 814586b..37455c6 100644 --- a/altsrc/yaml_file_loader_test.go +++ b/altsrc/yaml_file_loader_test.go @@ -6,8 +6,8 @@ import ( "os" "time" - "github.com/urfave/cli/v2" - "github.com/urfave/cli/v2/altsrc" + "github.com/urfave/cli/v3" + "github.com/urfave/cli/v3/altsrc" ) func ExampleApp_Run_yamlFileLoaderDuration() { diff --git a/go.mod b/go.mod index 4e39308..e144e41 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module github.com/urfave/cli/v2 +module github.com/urfave/cli/v3 -go 1.18 +go 1.19 require ( github.com/BurntSushi/toml v1.1.0 diff --git a/go.sum b/go.sum index 6beae99..96058c7 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -10,8 +8,6 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRT github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e h1:FDhOuMEY4JVRztM/gsbk+IKUQ8kj74bxZrgw87eMMVc= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/godoc-current.txt b/godoc-current.txt index c35428e..697c130 100644 --- a/godoc-current.txt +++ b/godoc-current.txt @@ -1,4 +1,4 @@ -package cli // import "github.com/urfave/cli/v2" +package cli // import "github.com/urfave/cli/v3" Package cli provides a minimal framework for creating and organizing command line Go applications. cli is designed to be easy to understand and write, @@ -1948,7 +1948,7 @@ type VisibleFlagCategory interface { } VisibleFlagCategory is a category containing flags. -package altsrc // import "github.com/urfave/cli/v2/altsrc" +package altsrc // import "github.com/urfave/cli/v3/altsrc" FUNCTIONS diff --git a/internal/build/build.go b/internal/build/build.go index d94dae7..777a630 100644 --- a/internal/build/build.go +++ b/internal/build/build.go @@ -13,7 +13,7 @@ import ( "path/filepath" "strings" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) const ( @@ -132,10 +132,10 @@ func TestActionFunc(c *cli.Context) error { tags := c.String("tags") for _, pkg := range c.StringSlice("packages") { - packageName := "github.com/urfave/cli/v2" + packageName := "github.com/urfave/cli/v3" if pkg != "cli" { - packageName = fmt.Sprintf("github.com/urfave/cli/v2/%s", pkg) + packageName = fmt.Sprintf("github.com/urfave/cli/v3/%s", pkg) } if err := runCmd( diff --git a/internal/example-cli/example-cli.go b/internal/example-cli/example-cli.go index 06cbbff..3e6e4da 100644 --- a/internal/example-cli/example-cli.go +++ b/internal/example-cli/example-cli.go @@ -3,7 +3,7 @@ package main import ( - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) func main() { diff --git a/internal/genflags/cmd/genflags/main.go b/internal/genflags/cmd/genflags/main.go index 4212e60..54759c0 100644 --- a/internal/genflags/cmd/genflags/main.go +++ b/internal/genflags/cmd/genflags/main.go @@ -13,8 +13,8 @@ import ( "syscall" "text/template" - "github.com/urfave/cli/v2" - "github.com/urfave/cli/v2/internal/genflags" + "github.com/urfave/cli/v3" + "github.com/urfave/cli/v3/internal/genflags" "gopkg.in/yaml.v3" ) diff --git a/internal/genflags/package_test.go b/internal/genflags/package_test.go index 3920540..81759f8 100644 --- a/internal/genflags/package_test.go +++ b/internal/genflags/package_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/urfave/cli/v2/internal/genflags" + "github.com/urfave/cli/v3/internal/genflags" ) func TestTypeName(t *testing.T) { diff --git a/internal/genflags/spec_test.go b/internal/genflags/spec_test.go index 25a9c8b..4a0cd4f 100644 --- a/internal/genflags/spec_test.go +++ b/internal/genflags/spec_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/urfave/cli/v2/internal/genflags" + "github.com/urfave/cli/v3/internal/genflags" ) func TestSpec_SortedFlagTypes(t *testing.T) { diff --git a/zz_generated.flags_test.go b/zz_generated.flags_test.go index 16519e6..a0769a2 100644 --- a/zz_generated.flags_test.go +++ b/zz_generated.flags_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) func TestFloat64SliceFlag_SatisfiesFlagInterface(t *testing.T) {