Repository: urfave/cli
Pull request #1494 (2022-09-12 11:52:41)

Bump declared module and internal usage to `/v3/`
## What type of PR is this?

- cleanup

## What this PR does / why we need it:

This change ensures that tags pushed from the `v3-dev-main` branch will declare a different package name than the `main` (v2) series.

## Which issue(s) this PR fixes:

Connected to #1507 


Patch:
diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml
index 1e4a51f..9ea3cdf 100644
--- a/.github/workflows/cli.yml
+++ b/.github/workflows/cli.yml
@@ -85,7 +85,7 @@ jobs:
           chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun"
 
       - name: gfmrun
-        run: go run internal/build/build.go gfmrun docs/v2/manual.md
+        run: go run internal/build/build.go gfmrun docs/v3/index.md
 
       - name: diff check
         run: |
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/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_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_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_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/docs/v3/index.md b/docs/v3/index.md
new file mode 100644
index 0000000..9632522
--- /dev/null
+++ b/docs/v3/index.md
@@ -0,0 +1,1 @@
+# v3 guide
diff --git a/go.mod b/go.mod
index 4e39308..62910e1 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/urfave/cli/v2
+module github.com/urfave/cli/v3
 
 go 1.18
 
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"
 )
 


Test patch:
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/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/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/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_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/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) {