Merge remote-tracking branch 'origin/v3-dev-main' into v3-porting

This commit is contained in:
Dan Buch 2022-10-02 20:16:11 -04:00
commit d34a232baf
Signed by: meatballhat
GPG Key ID: A12F782281063434
22 changed files with 30 additions and 26 deletions

View File

@ -92,7 +92,7 @@ jobs:
chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun"
- name: gfmrun
run: go run internal/build/build.go gfmrun --walk docs/v2/
run: go run internal/build/build.go gfmrun --walk docs/v3/
- name: diff check
run: |
@ -100,7 +100,10 @@ jobs:
git diff --cached --exit-code
publish:
if: startswith(github.ref, 'refs/tags/')
# TODO: switch once v3 is released {{
# if: startswith(github.ref, 'refs/tags/')
if: 'false'
# }}
name: publish
needs: [test-docs]
runs-on: ubuntu-latest

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -10,7 +10,7 @@ import (
"testing"
"time"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
type testApplyInputSource struct {

View File

@ -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

View File

@ -6,7 +6,7 @@ import (
"os"
"testing"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (

View File

@ -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

View File

@ -6,7 +6,7 @@ import (
"strings"
"time"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
// MapInputSource implements InputSourceContext to return

View File

@ -6,7 +6,7 @@ import (
"os"
"testing"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func TestCommandTomFileTest(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"reflect"
"github.com/BurntSushi/toml"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
type tomlMap struct {

View File

@ -6,7 +6,7 @@ import (
"os"
"testing"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func TestCommandYamlFileTest(t *testing.T) {

View File

@ -9,7 +9,7 @@ import (
"runtime"
"strings"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
"gopkg.in/yaml.v3"
)

View File

@ -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() {

View File

@ -14,7 +14,7 @@ import (
"syscall"
"text/template"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"gopkg.in/yaml.v3"

View File

@ -5,7 +5,7 @@ import (
"reflect"
"testing"
main "github.com/urfave/cli/v2/cmd/urfave-cli-genflags"
main "github.com/urfave/cli/v3/cmd/urfave-cli-genflags"
)
func TestTypeName(t *testing.T) {

1
docs/v3/index.md Normal file
View File

@ -0,0 +1 @@
# v3 guide

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/urfave/cli/v2
module github.com/urfave/cli/v3
go 1.18

View File

@ -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

View File

@ -13,7 +13,7 @@ import (
"path/filepath"
"strings"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@ -139,10 +139,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(

View File

@ -3,7 +3,7 @@
package main
import (
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func main() {

View File

@ -6,7 +6,7 @@ import (
"fmt"
"testing"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func TestFloat64SliceFlag_SatisfiesFlagInterface(t *testing.T) {