Skip to content

Commit 49a190d

Browse files
Merge pull request #26 from urfave/use-stable-v2
Change import to github.com/urfave/cli/v2 from gopkg
2 parents 0d053d1 + 81389c2 commit 49a190d

File tree

7 files changed

+35
-9
lines changed

7 files changed

+35
-9
lines changed

.travis.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
language: go
2-
dist: trusty
2+
sudo: false
3+
dist: bionic
4+
osx_image: xcode11.2
35
go:
46
- 1.11.x
57
- 1.12.x
8+
- 1.13.x
9+
10+
os:
11+
- linux
12+
- osx
13+
14+
env:
15+
GO111MODULE=on GOPROXY=https://proxy.golang.org
16+
617
addons:
718
apt:
819
packages:
920
- zsh
21+
1022
before_script:
1123
- go get github.com/sirupsen/logrus
1224
- go get github.com/stretchr/testify
13-
- go get gopkg.in/urfave/cli.v2
25+
- go get github.com/urfave/cli/v2
1426
- go get gopkg.in/yaml.v2
1527
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
1628

cli.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010

1111
"github.com/sirupsen/logrus"
12-
"gopkg.in/urfave/cli.v2"
12+
"github.com/urfave/cli/v2"
1313
)
1414

1515
func NewCLI() *cli.App {
@@ -22,6 +22,10 @@ func NewCLI() *cli.App {
2222
Name: "Dan Buch",
2323
Email: "dan@meatballhat.com",
2424
},
25+
{
26+
Name: "Ajitem Sahasrabuddhe",
27+
Email: "ajitem.s@outlook.com",
28+
},
2529
},
2630
Flags: []cli.Flag{
2731
&cli.StringSliceFlag{

cmd/gfmrun/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"os"
55
"testing"
66

7-
"gopkg.in/urfave/cli.v2"
7+
"github.com/urfave/cli/v2"
88
)
99

1010
func TestMain(m *testing.M) {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ go 1.11
55
require (
66
github.com/sirupsen/logrus v1.4.2
77
github.com/stretchr/testify v1.2.2
8-
gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717
8+
github.com/urfave/cli/v2 v2.0.0
99
gopkg.in/yaml.v2 v2.2.2
1010
)

go.sum

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1+
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
2+
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
3+
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
14
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
25
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
36
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
47
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
58
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
69
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
10+
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
11+
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
12+
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
13+
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
714
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
815
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
916
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
1017
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
1118
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
19+
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
20+
github.com/urfave/cli/v2 v2.0.0 h1:+HU9SCbu8GnEUFtIBfuUNXN39ofWViIEJIp6SURMpCg=
21+
github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
1222
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
1323
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1424
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

package.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os/user"
77
"path/filepath"
88

9-
"gopkg.in/urfave/cli.v2"
9+
"github.com/urfave/cli/v2"
1010
)
1111

1212
var (

runnable.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ func (rn *Runnable) IsValidOS() bool {
146146
return true
147147
}
148148

149-
switch v.(type) {
149+
switch val := v.(type) {
150150
case string:
151-
return runtime.GOOS == v.(string)
151+
return runtime.GOOS == val
152152
case []interface{}:
153-
for _, s := range v.([]interface{}) {
153+
for _, s := range val {
154154
if runtime.GOOS == s.(string) {
155155
return true
156156
}

0 commit comments

Comments
 (0)