From 11eaa165511ea9bfc724a38d0232b711f9c85554 Mon Sep 17 00:00:00 2001 From: Fedor Korotkiy Date: Sat, 12 Mar 2022 16:25:16 +0300 Subject: [PATCH] Run tests with race detector --- tools/testtool/commands/test_submission.go | 45 +++++++++-- .../incorrect/datarace/description.md | 1 + .../incorrect/datarace/private/.golangci.yml | 80 +++++++++++++++++++ .../datarace/private/datarace/sum.go | 8 ++ .../datarace/private/datarace/sum_solution.go | 8 ++ .../datarace/private/datarace/sum_test.go | 22 +++++ .../incorrect/datarace/private/go.mod | 9 +++ .../incorrect/datarace/private/go.sum | 53 ++++++++++++ .../datarace/student/datarace/sum.go | 26 ++++++ .../datarace/student/datarace/sum_test.go | 23 ++++++ .../incorrect/datarace/student/go.mod | 9 +++ .../incorrect/datarace/student/go.sum | 53 ++++++++++++ 12 files changed, 332 insertions(+), 5 deletions(-) create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/description.md create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/private/.golangci.yml create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum.go create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum_solution.go create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum_test.go create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/private/go.mod create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/private/go.sum create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/student/datarace/sum.go create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/student/datarace/sum_test.go create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/student/go.mod create mode 100644 tools/testtool/testdata/submissions/incorrect/datarace/student/go.sum diff --git a/tools/testtool/commands/test_submission.go b/tools/testtool/commands/test_submission.go index 9338b83..eb7a734 100644 --- a/tools/testtool/commands/test_submission.go +++ b/tools/testtool/commands/test_submission.go @@ -237,8 +237,11 @@ func runTests(testDir, privateRepo, problem string) error { return cmd.Run() } - binaries := map[string]string{} - testBinaries := map[string]string{} + var ( + binaries = make(map[string]string) + testBinaries = make(map[string]string) + raceBinaries = make(map[string]string) + ) //binPkgs, testPkgs := listTestsAndBinaries(filepath.Join(testDir, problem), []string{"-tags", "private", "-mod", "readonly"}) // todo return readonly binPkgs, testPkgs := listTestsAndBinaries(filepath.Join(testDir, problem), []string{"-tags", "private"}) @@ -263,15 +266,24 @@ func runTests(testDir, privateRepo, problem string) error { binariesJSON, _ := json.Marshal(binaries) for testPkg := range testPkgs { - binPath := filepath.Join(binCache, randomName()) - testBinaries[testPkg] = binPath - cmd := []string{"test", "-mod", "readonly", "-tags", "private", "-c", "-o", binPath, testPkg} + testPath := filepath.Join(binCache, randomName()) + testBinaries[testPkg] = testPath + + cmd := []string{"test", "-mod", "readonly", "-tags", "private", "-c", "-o", testPath, testPkg} if coverageReq.Enabled { cmd = append(cmd, "-cover", "-coverpkg", strings.Join(coveragePackages, ",")) } if err := runGo(cmd...); err != nil { return fmt.Errorf("error building test in %s: %w", testPkg, err) } + + racePath := filepath.Join(binCache, randomName()) + raceBinaries[testPkg] = racePath + + cmd = []string{"test", "-mod", "readonly", "-race", "-tags", "private", "-c", "-o", racePath, testPkg} + if err := runGo(cmd...); err != nil { + return fmt.Errorf("error building test in %s: %w", testPkg, err) + } } coverProfiles := []string{} @@ -306,6 +318,29 @@ func runTests(testDir, privateRepo, problem string) error { } } + { + cmd := exec.Command(raceBinaries[testPkg], "-test.bench=.") + if currentUserIsRoot() { + if err := sandbox(cmd); err != nil { + log.Fatal(err) + } + } + + cmd.Dir = filepath.Join(testDir, relPath) + cmd.Env = []string{ + testtool.BinariesEnv + "=" + string(binariesJSON), + "PATH=" + os.Getenv("PATH"), + "HOME=" + os.Getenv("HOME"), + "GOCACHE=" + goCache, + } + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + + if err := cmd.Run(); err != nil { + return &TestFailedError{E: err} + } + } + { benchCmd := exec.Command(testBinary, "-test.bench=.", "-test.run=^$") if currentUserIsRoot() { diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/description.md b/tools/testtool/testdata/submissions/incorrect/datarace/description.md new file mode 100644 index 0000000..77c9850 --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/description.md @@ -0,0 +1 @@ +Student solution compiles but does not pass tests. \ No newline at end of file diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/private/.golangci.yml b/tools/testtool/testdata/submissions/incorrect/datarace/private/.golangci.yml new file mode 100644 index 0000000..207bcb7 --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/private/.golangci.yml @@ -0,0 +1,80 @@ +# options for analysis running +run: + # default concurrency is a available CPU number + concurrency: 8 + + # timeout for analysis, e.g. 30s, 5m, default is 1m + deadline: 5m + + # exit code when at least one issue was found, default is 1 + issues-exit-code: 1 + + # include test files or not, default is true + tests: true + + +# output configuration options +output: + # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" + format: colored-line-number + + # print lines of code with issue, default is true + print-issued-lines: true + + # print linter name in the end of issue text, default is true + print-linter-name: true + + +# all available settings of specific linters +linters-settings: + govet: + # report about shadowed variables + check-shadowing: true + golint: + # minimal confidence for issues, default is 0.8 + min-confidence: 0.8 + gofmt: + # simplify code: gofmt with `-s` option, true by default + simplify: true + goimports: + # put imports beginning with prefix after 3rd-party packages; + # it's a comma-separated list of prefixes + local-prefixes: gitlab.com + stylecheck: + # https://staticcheck.io/docs/options#checks + checks: ["all", "-ST1018"] + +linters: + disable-all: true + enable: + - errcheck + - gofmt + - stylecheck + - gosimple + - govet + - ineffassign + - exportloopref + - staticcheck + - typecheck + - unconvert + + +issues: + # List of regexps of issue texts to exclude, empty list by default. + # But independently from this option we use default exclude patterns, + # it can be disabled by `exclude-use-default: false`. To list all + # excluded by default patterns execute `golangci-lint run --help` + exclude: + - Using the variable on range scope .* in function literal + + # Independently from option `exclude` we use default exclude patterns, + # it can be disabled by this option. To list all + # excluded by default patterns execute `golangci-lint run --help`. + # Default value for this option is true. + exclude-use-default: true + + # Maximum issues count per one linter. Set to 0 to disable. Default is 50. + max-per-linter: 0 + + # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. + max-same-issues: 0 diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum.go b/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum.go new file mode 100644 index 0000000..60b43b7 --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum.go @@ -0,0 +1,8 @@ +//go:build !solution +// +build !solution + +package datarace + +func Sum(a, b int64) int64 { + return 0 +} diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum_solution.go b/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum_solution.go new file mode 100644 index 0000000..1b78035 --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum_solution.go @@ -0,0 +1,8 @@ +//go:build solution +// +build solution + +package datarace + +func Sum(a, b int64) int64 { + return a + b +} diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum_test.go b/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum_test.go new file mode 100644 index 0000000..013db3a --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/private/datarace/sum_test.go @@ -0,0 +1,22 @@ +package datarace + +import ( + "math" + "testing" +) + +type testCase struct { + a, b, sum int64 +} + +func TestSum(t *testing.T) { + for _, input := range []testCase{ + {a: 2, b: 2, sum: 4}, + {a: 2, b: -2, sum: 0}, + {a: math.MaxInt64, b: 1, sum: math.MinInt64}, + } { + if out := Sum(input.a, input.b); out != input.sum { + t.Errorf("%d + %d == %d != %d", input.a, input.b, out, input.sum) + } + } +} diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/private/go.mod b/tools/testtool/testdata/submissions/incorrect/datarace/private/go.mod new file mode 100644 index 0000000..74beb58 --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/private/go.mod @@ -0,0 +1,9 @@ +module gitlab.com/slon/shad-go + +go 1.16 + +require ( + github.com/spf13/cobra v0.0.5 + github.com/stretchr/testify v1.4.0 + golang.org/x/tools v0.0.0-20200125223703-d33eef8e6825 +) diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/private/go.sum b/tools/testtool/testdata/submissions/incorrect/datarace/private/go.sum new file mode 100644 index 0000000..9d8b8ff --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/private/go.sum @@ -0,0 +1,53 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +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/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +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= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +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 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +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/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20200125223703-d33eef8e6825 h1:aNQeSIHKi0RWpKA5NO0CqyLjx6Beh5l0LLUEnndEjz0= +golang.org/x/tools v0.0.0-20200125223703-d33eef8e6825/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +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= diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/student/datarace/sum.go b/tools/testtool/testdata/submissions/incorrect/datarace/student/datarace/sum.go new file mode 100644 index 0000000..5b90bc5 --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/student/datarace/sum.go @@ -0,0 +1,26 @@ +//go:build !solution +// +build !solution + +package datarace + +import "sync" + +func Sum(a, b int64) int64 { + var s int64 + + var wg sync.WaitGroup + wg.Add(2) + + go func() { + defer wg.Done() + s += a + }() + + go func() { + defer wg.Done() + s += b + }() + + wg.Wait() + return s +} diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/student/datarace/sum_test.go b/tools/testtool/testdata/submissions/incorrect/datarace/student/datarace/sum_test.go new file mode 100644 index 0000000..ae0264e --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/student/datarace/sum_test.go @@ -0,0 +1,23 @@ +package datarace + +import ( + "math" + "testing" +) + +type testCase struct { + a, b, sum int64 +} + +func TestSum(t *testing.T) { + for _, input := range []testCase{ + {a: 2, b: 2, sum: 4}, + {a: 2, b: -2, sum: 0}, + {a: math.MaxInt64, b: 1, sum: math.MinInt64}, + {a: -1, b: -1, sum: -2}, + } { + if out := Sum(input.a, input.b); out != input.sum { + t.Errorf("%d + %d == %d != %d", input.a, input.b, out, input.sum) + } + } +} diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/student/go.mod b/tools/testtool/testdata/submissions/incorrect/datarace/student/go.mod new file mode 100644 index 0000000..74beb58 --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/student/go.mod @@ -0,0 +1,9 @@ +module gitlab.com/slon/shad-go + +go 1.16 + +require ( + github.com/spf13/cobra v0.0.5 + github.com/stretchr/testify v1.4.0 + golang.org/x/tools v0.0.0-20200125223703-d33eef8e6825 +) diff --git a/tools/testtool/testdata/submissions/incorrect/datarace/student/go.sum b/tools/testtool/testdata/submissions/incorrect/datarace/student/go.sum new file mode 100644 index 0000000..9d8b8ff --- /dev/null +++ b/tools/testtool/testdata/submissions/incorrect/datarace/student/go.sum @@ -0,0 +1,53 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +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/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +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= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +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 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +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/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20200125223703-d33eef8e6825 h1:aNQeSIHKi0RWpKA5NO0CqyLjx6Beh5l0LLUEnndEjz0= +golang.org/x/tools v0.0.0-20200125223703-d33eef8e6825/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +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=