From ed0c57b91ee3670d91ebe039f5cb83f36ad27f10 Mon Sep 17 00:00:00 2001 From: Dave Brophy Date: Sat, 27 Jan 2018 20:21:29 +0100 Subject: [PATCH 1/8] Orders source files before compilation to ensure reproducible output --- build/build.go | 5 ++++- compiler/package.go | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/build/build.go b/build/build.go index 0f9666f7c..a857db68c 100644 --- a/build/build.go +++ b/build/build.go @@ -225,7 +225,10 @@ func parseAndAugment(xctx XContext, pkg *PackageData, isTest bool, fileSet *toke if err != nil { panic(err) } - file, err := parser.ParseFile(fileSet, fullPath, r, parser.ParseComments) + // Files should be uniquely named and in the original package directory in order to be + // ordered correctly + newPath := path.Join(pkg.Dir, "__"+name) + file, err := parser.ParseFile(fileSet, newPath, r, parser.ParseComments) if err != nil { panic(err) } diff --git a/compiler/package.go b/compiler/package.go index d1ffd13ea..c68957450 100644 --- a/compiler/package.go +++ b/compiler/package.go @@ -135,6 +135,12 @@ func Compile(importPath string, files []*ast.File, fileSet *token.FileSet, impor // Some other unexpected panic, catch the stack trace and return as an error. err = bailout(e) }() + + // Files must be in the same order to get reproducible JS + sort.Slice(files, func(i, j int) bool { + return fileSet.File(files[i].Pos()).Name() > fileSet.File(files[j].Pos()).Name() + }) + typesInfo := &types.Info{ Types: make(map[ast.Expr]types.TypeAndValue), Defs: make(map[*ast.Ident]types.Object), From befe1db0c83c0f0561a6ddd3326aa41237fcee5c Mon Sep 17 00:00:00 2001 From: Dave Brophy Date: Tue, 30 Jan 2018 11:34:56 +0100 Subject: [PATCH 2/8] Test for different order files --- compiler/compiler_test.go | 155 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 compiler/compiler_test.go diff --git a/compiler/compiler_test.go b/compiler/compiler_test.go new file mode 100644 index 000000000..56116b6ed --- /dev/null +++ b/compiler/compiler_test.go @@ -0,0 +1,155 @@ +package compiler + +import ( + "bytes" + "go/ast" + "go/build" + "go/parser" + "go/token" + "go/types" + "testing" + + "fmt" + + "github.com/sergi/go-diff/diffmatchpatch" + "golang.org/x/tools/go/loader" +) + +func TestOrder(t *testing.T) { + fileA := ` +package foo + +var Avar = "a" + +type Atype struct{} + +func Afunc() int { + var varA = 1 + var varB = 2 + return varA+varB +} +` + + fileB := ` +package foo + +var Bvar = "b" + +type Btype struct{} + +func Bfunc() int { + var varA = 1 + var varB = 2 + return varA+varB +} +` + files := []source{{"fileA.go", []byte(fileA)}, {"fileB.go", []byte(fileB)}} + + compare(t, "foo", files, false) + compare(t, "foo", files, true) + +} + +func compare(t *testing.T, path string, sourceFiles []source, minify bool) { + outputNormal, err := compile(path, sourceFiles, minify) + if err != nil { + t.Fatal(err) + } + + // reverse the array + for i, j := 0, len(sourceFiles)-1; i < j; i, j = i+1, j-1 { + sourceFiles[i], sourceFiles[j] = sourceFiles[j], sourceFiles[i] + } + + outputReversed, err := compile(path, sourceFiles, minify) + if err != nil { + t.Fatal(err) + } + + if string(outputNormal) != string(outputReversed) { + dmp := diffmatchpatch.New() + diffs := dmp.DiffMain(string(outputNormal), string(outputReversed), true) + fmt.Println(dmp.DiffPrettyText(diffs)) + t.Fatal("files in different order produces differens JS") + } +} + +type source struct { + name string + contents []byte +} + +func compile(path string, sourceFiles []source, minify bool) ([]byte, error) { + + conf := loader.Config{} + conf.Fset = token.NewFileSet() + conf.ParserMode = parser.ParseComments + + context := build.Default // make a copy of build.Default + conf.Build = &context + conf.Build.BuildTags = []string{"js"} + + var astFiles []*ast.File + for _, sourceFile := range sourceFiles { + astFile, err := parser.ParseFile(conf.Fset, sourceFile.name, sourceFile.contents, parser.ParseComments) + if err != nil { + return nil, err + } + astFiles = append(astFiles, astFile) + } + conf.CreateFromFiles(path, astFiles...) + prog, err := conf.Load() + if err != nil { + return nil, err + } + + archiveCache := map[string]*Archive{} + var importContext *ImportContext + importContext = &ImportContext{ + Packages: make(map[string]*types.Package), + Import: func(path string) (*Archive, error) { + + // find in local cache + if a, ok := archiveCache[path]; ok { + return a, nil + } + + pi := prog.Package(path) + importContext.Packages[path] = pi.Pkg + + // compile package + a, err := Compile(path, pi.Files, prog.Fset, importContext, minify) + if err != nil { + return nil, err + } + archiveCache[path] = a + return a, nil + }, + } + + a, err := importContext.Import(path) + if err != nil { + return nil, err + } + b, err := renderPackage(a) + if err != nil { + return nil, err + } + return b, nil +} + +func renderPackage(archive *Archive) ([]byte, error) { + + selection := make(map[*Decl]struct{}) + for _, d := range archive.Declarations { + selection[d] = struct{}{} + } + + buf := &bytes.Buffer{} + + if err := WritePkgCode(archive, selection, false, &SourceMapFilter{Writer: buf}); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} From bf5905b000457c888bcb390c85d05165fdb97e8b Mon Sep 17 00:00:00 2001 From: Dave Brophy Date: Fri, 6 Apr 2018 16:59:20 +0200 Subject: [PATCH 3/8] Review tweaks --- compiler/compiler_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/compiler_test.go b/compiler/compiler_test.go index 56116b6ed..df7c7de5c 100644 --- a/compiler/compiler_test.go +++ b/compiler/compiler_test.go @@ -8,7 +8,6 @@ import ( "go/token" "go/types" "testing" - "fmt" "github.com/sergi/go-diff/diffmatchpatch" @@ -80,7 +79,6 @@ type source struct { } func compile(path string, sourceFiles []source, minify bool) ([]byte, error) { - conf := loader.Config{} conf.Fset = token.NewFileSet() conf.ParserMode = parser.ParseComments From 91e3aa307c82506238b69d43e9301e88e5f74dd3 Mon Sep 17 00:00:00 2001 From: Dave Brophy Date: Sat, 7 Apr 2018 08:19:07 +0200 Subject: [PATCH 4/8] Import order --- compiler/compiler_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/compiler_test.go b/compiler/compiler_test.go index df7c7de5c..c337f9c83 100644 --- a/compiler/compiler_test.go +++ b/compiler/compiler_test.go @@ -2,13 +2,13 @@ package compiler import ( "bytes" + "fmt" "go/ast" "go/build" "go/parser" "go/token" "go/types" "testing" - "fmt" "github.com/sergi/go-diff/diffmatchpatch" "golang.org/x/tools/go/loader" From bd20b0e6122d2717846cb902d8fe70fbfbeef105 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 3 Jan 2022 15:52:25 +0100 Subject: [PATCH 5/8] Update go.mod with new dep --- go.mod | 2 +- go.sum | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fe517f1c2..112091691 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/google/go-cmp v0.5.6 github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86 github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c + github.com/sergi/go-diff v1.2.0 github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636 github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 github.com/spf13/cobra v1.2.1 @@ -19,7 +20,6 @@ require ( require ( github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect ) diff --git a/go.sum b/go.sum index 301b83448..84acf7a15 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -196,6 +197,7 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -204,13 +206,13 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636 h1:aSISeOcal5irEhJd1M+IrApc0PdcN7e7Aj4yuEnOrfQ= github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU= -github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= @@ -227,6 +229,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -570,13 +573,16 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 932e1e67f844c3af86f7e8b289dc407ec72cfecc Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 3 Jan 2022 15:58:00 +0100 Subject: [PATCH 6/8] Update WritePkgCode call --- compiler/compiler_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/compiler_test.go b/compiler/compiler_test.go index c337f9c83..29d2ae465 100644 --- a/compiler/compiler_test.go +++ b/compiler/compiler_test.go @@ -46,7 +46,6 @@ func Bfunc() int { compare(t, "foo", files, false) compare(t, "foo", files, true) - } func compare(t *testing.T, path string, sourceFiles []source, minify bool) { @@ -106,7 +105,6 @@ func compile(path string, sourceFiles []source, minify bool) ([]byte, error) { importContext = &ImportContext{ Packages: make(map[string]*types.Package), Import: func(path string) (*Archive, error) { - // find in local cache if a, ok := archiveCache[path]; ok { return a, nil @@ -137,7 +135,6 @@ func compile(path string, sourceFiles []source, minify bool) ([]byte, error) { } func renderPackage(archive *Archive) ([]byte, error) { - selection := make(map[*Decl]struct{}) for _, d := range archive.Declarations { selection[d] = struct{}{} @@ -145,7 +142,7 @@ func renderPackage(archive *Archive) ([]byte, error) { buf := &bytes.Buffer{} - if err := WritePkgCode(archive, selection, false, &SourceMapFilter{Writer: buf}); err != nil { + if err := WritePkgCode(archive, selection, goLinknameSet{}, false, &SourceMapFilter{Writer: buf}); err != nil { return nil, err } From b46b3b806002861dd4316249ec0a9820f672a7e0 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Tue, 4 Jan 2022 17:04:48 +0100 Subject: [PATCH 7/8] Use gopherjs__ prefix for filenames --- build/build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.go b/build/build.go index a857db68c..1118ce233 100644 --- a/build/build.go +++ b/build/build.go @@ -227,7 +227,7 @@ func parseAndAugment(xctx XContext, pkg *PackageData, isTest bool, fileSet *toke } // Files should be uniquely named and in the original package directory in order to be // ordered correctly - newPath := path.Join(pkg.Dir, "__"+name) + newPath := path.Join(pkg.Dir, "gopherjs__"+name) file, err := parser.ParseFile(fileSet, newPath, r, parser.ParseComments) if err != nil { panic(err) From 05ff22d89ba915ca1c5bdf1be825a77eea1ee250 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Tue, 4 Jan 2022 17:07:11 +0100 Subject: [PATCH 8/8] Use go-cmp for tests --- compiler/compiler_test.go | 10 +++------- go.mod | 1 - go.sum | 8 -------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/compiler/compiler_test.go b/compiler/compiler_test.go index 29d2ae465..377f09d94 100644 --- a/compiler/compiler_test.go +++ b/compiler/compiler_test.go @@ -2,7 +2,6 @@ package compiler import ( "bytes" - "fmt" "go/ast" "go/build" "go/parser" @@ -10,7 +9,7 @@ import ( "go/types" "testing" - "github.com/sergi/go-diff/diffmatchpatch" + "github.com/google/go-cmp/cmp" "golang.org/x/tools/go/loader" ) @@ -64,11 +63,8 @@ func compare(t *testing.T, path string, sourceFiles []source, minify bool) { t.Fatal(err) } - if string(outputNormal) != string(outputReversed) { - dmp := diffmatchpatch.New() - diffs := dmp.DiffMain(string(outputNormal), string(outputReversed), true) - fmt.Println(dmp.DiffPrettyText(diffs)) - t.Fatal("files in different order produces differens JS") + if diff := cmp.Diff(string(outputNormal), string(outputReversed)); diff != "" { + t.Errorf("files in different order produce different JS:\n%s", diff) } } diff --git a/go.mod b/go.mod index 112091691..593b5090e 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ require ( github.com/google/go-cmp v0.5.6 github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86 github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c - github.com/sergi/go-diff v1.2.0 github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636 github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 github.com/spf13/cobra v1.2.1 diff --git a/go.sum b/go.sum index 84acf7a15..9bb91da22 100644 --- a/go.sum +++ b/go.sum @@ -57,7 +57,6 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -197,7 +196,6 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -206,8 +204,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636 h1:aSISeOcal5irEhJd1M+IrApc0PdcN7e7Aj4yuEnOrfQ= github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= @@ -229,7 +225,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -573,16 +568,13 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=