From 6a35ae7504e2bcae2e909c8cca993f1bdb313a10 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Fri, 29 Nov 2019 13:53:59 +0900 Subject: [PATCH 1/8] Add platform matrix --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b42867..a2ae4f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,10 +5,11 @@ on: push jobs: job-test: name: Test - runs-on: ubuntu-latest strategy: matrix: go_version: [1.12, 1.13] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} steps: - name: Set up Go ${{ matrix.go_version }} uses: actions/setup-go@v1 From df8c5f432cfc8bcaf20d97da72f706f169232964 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Fri, 29 Nov 2019 13:55:01 +0900 Subject: [PATCH 2/8] Add if --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2ae4f6..1599dfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: go-version: ${{ matrix.go_version }} - name: Install codecov + if: matrix.platform == 'ubuntu-latest' run: sudo pip install codecov - name: Check out source code @@ -28,6 +29,7 @@ jobs: GOPROXY: "https://proxy.golang.org" - name: Run codecov + if: matrix.platform == 'ubuntu-latest' run: codecov env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From c0fb46381a3335d6f4ce5c05642e36db031184c4 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Sat, 30 Nov 2019 10:26:51 +0900 Subject: [PATCH 3/8] Add test step for windows --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1599dfe..9dde7a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,9 +25,17 @@ jobs: - name: Test run: env PATH=`go env GOPATH`/bin:$PATH make ci + if: matrix.platform != 'windows-latest' env: GOPROXY: "https://proxy.golang.org" + - name: Test + run: go test ./... + if: matrix.platform == 'windows-latest' + env: + GO111MODULE: on + GOPROXY: "https://proxy.golang.org" + - name: Run codecov if: matrix.platform == 'ubuntu-latest' run: codecov From fc159524e2f14a304ff73eb292d02a88de915928 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Sat, 30 Nov 2019 10:29:22 +0900 Subject: [PATCH 4/8] Use cmd --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9dde7a4..38fee1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: - name: Test run: go test ./... + shell: cmd if: matrix.platform == 'windows-latest' env: GO111MODULE: on From 0b39cb14d37b3c549d3488e3977a6ec854814995 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Sat, 30 Nov 2019 11:12:55 +0900 Subject: [PATCH 5/8] Use colorable.NewNonColorable --- cmd/root.go | 8 ++++--- eraser/eraser.go | 54 ++++++++++++++++++------------------------- eraser/eraser_test.go | 27 ++++++++++++++++++---- go.mod | 1 - go.sum | 8 ------- 5 files changed, 50 insertions(+), 48 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index eee381d..f686355 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -63,9 +63,11 @@ var rootCmd = &cobra.Command{ defer cancel() if erase { - e := eraser.NewEraser() - for o := range e.Handle(ctx, os.Stdin) { - fmt.Fprintf(os.Stdout, "%s", o) + e := eraser.NewEraser(os.Stdout) + err := e.Handle(ctx, os.Stdin) + if err != nil { + _, _ = fmt.Fprintf(os.Stderr, "%s\n", err) + os.Exit(1) } } else { p := painter.NewPainter(args) diff --git a/eraser/eraser.go b/eraser/eraser.go index 46e18c9..f5ad5a2 100644 --- a/eraser/eraser.go +++ b/eraser/eraser.go @@ -3,49 +3,41 @@ package eraser import ( "bufio" "context" - "fmt" "io" - "os" - "github.com/acarl005/stripansi" + "github.com/mattn/go-colorable" ) type Eraser struct { - out chan string + out io.Writer } -func NewEraser() *Eraser { +func NewEraser(out io.Writer) *Eraser { return &Eraser{ - out: make(chan string), + out: out, } } -func (e *Eraser) Erase(s string) string { - return stripansi.Strip(s) -} - -func (e *Eraser) Handle(ctx context.Context, inn io.Reader) <-chan string { +func (e *Eraser) Handle(ctx context.Context, inn io.Reader) error { in := bufio.NewReader(inn) - - go func() { - defer close(e.out) - L: - for { - s, err := in.ReadString('\n') - if err == io.EOF { - break - } else if err != nil { - _, _ = fmt.Fprintf(os.Stderr, "%s\n", err) - os.Exit(1) - } - select { - case <-ctx.Done(): - break L - default: - e.out <- e.Erase(s) + out := colorable.NewNonColorable(e.out) + + for { + s, err := in.ReadBytes('\n') + if err == io.EOF { + break + } else if err != nil { + return err + } + select { + case <-ctx.Done(): + break + default: + _, err = out.Write(s) + if err != nil { + return nil } } - }() - - return e.out + } + return nil } diff --git a/eraser/eraser_test.go b/eraser/eraser_test.go index 8bedfb8..09dde39 100644 --- a/eraser/eraser_test.go +++ b/eraser/eraser_test.go @@ -1,6 +1,11 @@ package eraser -import "testing" +import ( + "bytes" + "context" + "fmt" + "testing" +) func TestErase(t *testing.T) { var tests = []struct { @@ -12,11 +17,23 @@ func TestErase(t *testing.T) { {"\x1b[31;1mHe\x1b[0ml\x1b[36;1mlo\x1b[0m", "Hello"}, } - e := NewEraser() for _, tt := range tests { - got := e.Erase(tt.in) - if tt.want != got { - t.Errorf("Erase(): got = %v ,want = %v", got, tt.want) + stdin := &bytes.Buffer{} + stdout := &bytes.Buffer{} + ctx := context.Background() + e := NewEraser(stdout) + stdin.WriteString(fmt.Sprintf("%s\n", tt.in)) + err := e.Handle(ctx, stdin) + if err != nil { + t.Fatal(err) + } + got, err := stdout.ReadString('\n') + if err != nil { + t.Fatal(err) + } + want := fmt.Sprintf("%s\n", tt.want) + if want != got { + t.Errorf("Paint(): got = %#v ,want = %#v", got, want) } } } diff --git a/go.mod b/go.mod index 365ffa2..0339c28 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/k1LoW/colr go 1.12 require ( - github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d github.com/labstack/gommon v0.2.9 github.com/mattn/go-colorable v0.1.2 github.com/mattn/go-isatty v0.0.8 diff --git a/go.sum b/go.sum index 1f2e88e..9e7c7a6 100644 --- a/go.sum +++ b/go.sum @@ -1,17 +1,13 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= -github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/labstack/gommon v0.2.9 h1:heVeuAYtevIQVYkGj6A41dtfT91LrvFG220lavpWhrU= github.com/labstack/gommon v0.2.9/go.mod h1:E8ZTmW9vw5az5/ZyHWCp0Lw4OH2ecsaBP1C/NKavGG4= @@ -23,7 +19,6 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= @@ -37,7 +32,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -47,9 +41,7 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 h1:LepdCS8Gf/MVejFIt8lsiexZATdoGVyp5bcyS+rYoUI= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 2299b048cd24a59e0d4f9823c6925fc117ab4811 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Sat, 30 Nov 2019 11:34:58 +0900 Subject: [PATCH 6/8] Add integration test --- .github/workflows/ci.yml | 4 +++- Makefile | 5 ++++- integration_test.go | 42 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 integration_test.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38fee1d..735920a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,9 @@ jobs: GOPROXY: "https://proxy.golang.org" - name: Test - run: go test ./... + run: | + go test ./... + go test ./... -tags integration shell: cmd if: matrix.platform == 'windows-latest' env: diff --git a/Makefile b/Makefile index 84baebf..d4e553a 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,14 @@ BUILD_LDFLAGS = -X $(PKG).commit=$(COMMIT) -X $(PKG).date=$(DATE) default: test -ci: depsdev test sec +ci: depsdev test test_integration sec test: go test ./... -coverprofile=coverage.txt -covermode=count +test_integration: build + go test ./... -tags integration + sec: gosec ./... diff --git a/integration_test.go b/integration_test.go new file mode 100644 index 0000000..ecd41b2 --- /dev/null +++ b/integration_test.go @@ -0,0 +1,42 @@ +// +build integration + +package main + +import ( + "os/exec" + "runtime" + "testing" +) + +func init() { + err := exec.Command("go", "build").Run() + if err != nil { + panic(err) + } +} + +func TestPaintAndErase(t *testing.T) { + var ( + got []byte + err error + ) + if runtime.GOOS == "windows" { + got, err = exec.Command("cmd", "/c", `echo Hello | .\colr.exe He | .\colr.exe --erase`).Output() + } else { + got, err = exec.Command("bash", "-c", `echo Hello | ./colr He | ./colr --erase`).Output() + } + if err != nil { + t.Fatal(err) + } + want := "Hello\n" + if want != string(got) { + t.Errorf("got = %#v ,want = %#v", string(got), want) + } +} + +type testcase struct { + name string + cmd []string + want string + processFinished bool +} From 9a8381b3951618561dd5671c6d7404380698339e Mon Sep 17 00:00:00 2001 From: k1LoW Date: Sat, 30 Nov 2019 11:38:35 +0900 Subject: [PATCH 7/8] Fix test --- integration_test.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/integration_test.go b/integration_test.go index ecd41b2..ad70028 100644 --- a/integration_test.go +++ b/integration_test.go @@ -17,18 +17,21 @@ func init() { func TestPaintAndErase(t *testing.T) { var ( - got []byte - err error + got []byte + want string + err error ) if runtime.GOOS == "windows" { - got, err = exec.Command("cmd", "/c", `echo Hello | .\colr.exe He | .\colr.exe --erase`).Output() + got, err = exec.Command("cmd", "/c", `echo Hello| .\colr.exe He | .\colr.exe --erase`).Output() + want = "Hello\r\n" } else { - got, err = exec.Command("bash", "-c", `echo Hello | ./colr He | ./colr --erase`).Output() + got, err = exec.Command("bash", "-c", `echo Hello| ./colr He | ./colr --erase`).Output() + want = "Hello\n" } if err != nil { t.Fatal(err) } - want := "Hello\n" + if want != string(got) { t.Errorf("got = %#v ,want = %#v", string(got), want) } From d4efedef1ff3278771f10a882ec6755a0077da6d Mon Sep 17 00:00:00 2001 From: k1LoW Date: Sat, 30 Nov 2019 11:44:51 +0900 Subject: [PATCH 8/8] Bump up go version --- go.mod | 9 ++++----- go.sum | 25 +++++++++++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 0339c28..f99b125 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,10 @@ module github.com/k1LoW/colr -go 1.12 +go 1.13 require ( - github.com/labstack/gommon v0.2.9 - github.com/mattn/go-colorable v0.1.2 - github.com/mattn/go-isatty v0.0.8 + github.com/labstack/gommon v0.3.0 + github.com/mattn/go-colorable v0.1.4 + github.com/mattn/go-isatty v0.0.10 github.com/spf13/cobra v0.0.5 - golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 // indirect ) diff --git a/go.sum b/go.sum index 9e7c7a6..51de8c0 100644 --- a/go.sum +++ b/go.sum @@ -5,20 +5,26 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/labstack/gommon v0.2.9 h1:heVeuAYtevIQVYkGj6A41dtfT91LrvFG220lavpWhrU= -github.com/labstack/gommon v0.2.9/go.mod h1:E8ZTmW9vw5az5/ZyHWCp0Lw4OH2ecsaBP1C/NKavGG4= +github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= @@ -30,9 +36,9 @@ github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= @@ -40,8 +46,11 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=