From 54e2797944cfa456628feca535bda42238a32c80 Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 21 Aug 2023 13:04:52 -0500 Subject: [PATCH 1/7] go 1.21 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/labels.yaml | 21 --------------------- go.mod | 3 +-- go.sum | 3 +++ 4 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/labels.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e64ed04..40bcc57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - uses: WillAbides/setup-go-faster@v1 id: setup-go with: - go-version: '1.20.x' + go-version: '1.21.x' - uses: actions/cache@v3 with: path: | @@ -43,7 +43,7 @@ jobs: - uses: WillAbides/setup-go-faster@v1 id: setup-go with: - go-version: '1.20.x' + go-version: '1.21.x' - uses: actions/cache@v3 with: path: | @@ -61,7 +61,7 @@ jobs: - uses: WillAbides/setup-go-faster@v1 id: setup-go with: - go-version: '1.20.x' + go-version: '1.21.x' - name: configure git run: | git config --global user.name 'github-actions[bot]' @@ -90,7 +90,7 @@ jobs: - uses: WillAbides/setup-go-faster@v1 id: setup-go with: - go-version: '1.20.x' + go-version: '1.21.x' - uses: actions/cache@v3 with: path: | diff --git a/.github/workflows/labels.yaml b/.github/workflows/labels.yaml deleted file mode 100644 index c50301e..0000000 --- a/.github/workflows/labels.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: labels -on: - pull_request: - types: - - synchronize - - opened - - reopened - - labeled - - unlabeled -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true -jobs: - label_check: - name: check labels - runs-on: ubuntu-22.04 - if: github.event_name == 'pull_request' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: WillAbides/release-train@v1.6.1 diff --git a/go.mod b/go.mod index eeef80c..a0a6ee6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/willabides/bindown/v4 -go 1.20 +go 1.21 require ( github.com/AlecAivazis/survey/v2 v2.3.6 @@ -8,7 +8,6 @@ require ( github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 github.com/alecthomas/kong v0.7.1 github.com/creack/pty v1.1.18 - github.com/google/go-cmp v0.5.9 github.com/google/go-github/v52 v52.0.0 github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec github.com/invopop/jsonschema v0.7.0 diff --git a/go.sum b/go.sum index 24a6cb9..35a06a0 100644 --- a/go.sum +++ b/go.sum @@ -26,9 +26,11 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDe github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= +github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA= github.com/alecthomas/kong v0.7.1 h1:azoTh0IOfwlAX3qN9sHWTxACE2oV8Bg2gAwBsMwDQY4= github.com/alecthomas/kong v0.7.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U= github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE= +github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= @@ -112,6 +114,7 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= From 429e6f8fca0ba67248b225955b2cdf7c89e18048 Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 21 Aug 2023 13:10:50 -0500 Subject: [PATCH 2/7] go 1.21 adds wasip1/wasm --- internal/bindown/go_dist_list.txt | 2 +- internal/builddep/builddep.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/bindown/go_dist_list.txt b/internal/bindown/go_dist_list.txt index 2977438..d2d5c6b 100644 --- a/internal/bindown/go_dist_list.txt +++ b/internal/bindown/go_dist_list.txt @@ -36,11 +36,11 @@ openbsd/386 openbsd/amd64 openbsd/arm openbsd/arm64 -openbsd/mips64 plan9/386 plan9/amd64 plan9/arm solaris/amd64 +wasip1/wasm windows/386 windows/amd64 windows/arm diff --git a/internal/builddep/builddep.go b/internal/builddep/builddep.go index d8d385a..a391030 100644 --- a/internal/builddep/builddep.go +++ b/internal/builddep/builddep.go @@ -15,7 +15,8 @@ import ( ) var forbiddenOS = map[string]bool{ - "js": true, + "js": true, + "wasip1": true, } var forbiddenArch = map[string]bool{ From 3eadad227a379247aada6496763928aba1c21129 Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 21 Aug 2023 13:20:12 -0500 Subject: [PATCH 3/7] use "maps" instead of "golang.org/x/exp/maps" --- cmd/bindown/templatesource.go | 4 ++-- internal/bindown/dependency.go | 4 ++-- internal/bindown/util.go | 10 +++++++++- internal/builddep/builddep.go | 5 ++--- internal/builddep/depgroup.go | 2 +- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/cmd/bindown/templatesource.go b/cmd/bindown/templatesource.go index 50c87f0..b7d0029 100644 --- a/cmd/bindown/templatesource.go +++ b/cmd/bindown/templatesource.go @@ -5,7 +5,7 @@ import ( "sort" "text/tabwriter" - "golang.org/x/exp/maps" + "github.com/willabides/bindown/v4/internal/bindown" ) type templateSourceCmd struct { @@ -22,7 +22,7 @@ func (c *templateSourceListCmd) Run(ctx *runContext) error { return err } w := tabwriter.NewWriter(ctx.stdout, 0, 0, 1, ' ', 0) - sourceNames := maps.Keys(cfg.TemplateSources) + sourceNames := bindown.MapKeys(cfg.TemplateSources) sort.Strings(sourceNames) for _, name := range sourceNames { fmt.Fprintln(w, name+"\t"+cfg.TemplateSources[name]) diff --git a/internal/bindown/dependency.go b/internal/bindown/dependency.go index ce8ea14..b17a05b 100644 --- a/internal/bindown/dependency.go +++ b/internal/bindown/dependency.go @@ -2,11 +2,11 @@ package bindown import ( "fmt" + "maps" "os" "path/filepath" "github.com/Masterminds/semver/v3" - "golang.org/x/exp/maps" "golang.org/x/exp/slices" ) @@ -217,7 +217,7 @@ func (d *Overrideable) applyOverrides(system System, depth int) error { if _, ok := systemVars["arch"]; !ok { systemVars["arch"] = system.Arch() } - match := !slices.ContainsFunc(maps.Keys(d.Overrides[i].OverrideMatcher), func(varName string) bool { + match := !slices.ContainsFunc(MapKeys(d.Overrides[i].OverrideMatcher), func(varName string) bool { overridePatterns := d.Overrides[i].OverrideMatcher[varName] val := systemVars[varName] // A match is found if the value is an exact match for a pattern or if the diff --git a/internal/bindown/util.go b/internal/bindown/util.go index e8734e9..0d876e5 100644 --- a/internal/bindown/util.go +++ b/internal/bindown/util.go @@ -9,6 +9,7 @@ import ( "hash" "hash/fnv" "io" + "maps" "os" "path/filepath" "strings" @@ -16,7 +17,6 @@ import ( "github.com/Masterminds/semver/v3" ignore "github.com/sabhiram/go-gitignore" - "golang.org/x/exp/maps" "golang.org/x/exp/slices" "gopkg.in/yaml.v3" ) @@ -302,3 +302,11 @@ func gitRepo(dir string) (string, error) { } return gitRepo(parent) } + +func MapKeys[M ~map[K]V, K comparable, V any](m M) []K { + r := make([]K, 0, len(m)) + for k := range m { + r = append(r, k) + } + return r +} diff --git a/internal/builddep/builddep.go b/internal/builddep/builddep.go index a391030..7591496 100644 --- a/internal/builddep/builddep.go +++ b/internal/builddep/builddep.go @@ -8,7 +8,6 @@ import ( "github.com/Masterminds/semver/v3" "github.com/google/go-github/v52/github" "github.com/willabides/bindown/v4/internal/bindown" - "golang.org/x/exp/maps" "golang.org/x/exp/slices" "golang.org/x/oauth2" "gopkg.in/yaml.v3" @@ -407,7 +406,7 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b systemFiles[system] = sf[:1] } - templates := maps.Keys(urlFrequency) + templates := bindown.MapKeys(urlFrequency) slices.SortFunc(templates, func(a, b string) bool { return urlFrequency[a] > urlFrequency[b] }) @@ -421,7 +420,7 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b } var groups []*depGroup - systems := maps.Keys(systemFiles) + systems := bindown.MapKeys(systemFiles) slices.SortFunc(systems, func(a, b bindown.System) bool { if len(systemFiles[a]) == 0 || len(systemFiles[b]) == 0 { return len(systemFiles[a]) > 0 diff --git a/internal/builddep/depgroup.go b/internal/builddep/depgroup.go index edfbe9d..babdba0 100644 --- a/internal/builddep/depgroup.go +++ b/internal/builddep/depgroup.go @@ -3,10 +3,10 @@ package builddep import ( "context" "fmt" + "maps" "path" "github.com/willabides/bindown/v4/internal/bindown" - "golang.org/x/exp/maps" "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" ) From 8a7897ce8035898b847aa4b453db2f8a61a1a81e Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 21 Aug 2023 13:24:08 -0500 Subject: [PATCH 4/7] update golangci-lint --- bindown.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bindown.yml b/bindown.yml index 8d948bd..e721e26 100644 --- a/bindown.yml +++ b/bindown.yml @@ -21,7 +21,7 @@ dependencies: golangci-lint: template: origin#golangci-lint vars: - version: 1.51.2 + version: 1.54.2 goreleaser: template: origin#goreleaser vars: @@ -328,10 +328,10 @@ url_checksums: https://github.com/cli/cli/releases/download/v2.30.0/gh_2.30.0_macOS_amd64.zip: 6b91c446586935de0e9df82da58309b2d1b83061cfcd4cc173124270f1277ca7 https://github.com/cli/cli/releases/download/v2.30.0/gh_2.30.0_macOS_arm64.zip: 32a71652367f3cf664894456e4c4f655faa95964d71cc3a449fbf64bdce1fff1 https://github.com/cli/cli/releases/download/v2.30.0/gh_2.30.0_windows_amd64.zip: 7d466686978e3c93e1a412229a77921288862cec183e94ad06cd36bfcd34ebaf - https://github.com/golangci/golangci-lint/releases/download/v1.51.2/golangci-lint-1.51.2-darwin-amd64.tar.gz: 0549cbaa2df451cf3a2011a9d73a9cb127784d26749d9cd14c9f4818af104d44 - https://github.com/golangci/golangci-lint/releases/download/v1.51.2/golangci-lint-1.51.2-darwin-arm64.tar.gz: 36e69882205a0e42a63ad57ec3015639c11051e03f0beb9cf7949c6451408960 - https://github.com/golangci/golangci-lint/releases/download/v1.51.2/golangci-lint-1.51.2-linux-amd64.tar.gz: 4de479eb9d9bc29da51aec1834e7c255b333723d38dbd56781c68e5dddc6a90b - https://github.com/golangci/golangci-lint/releases/download/v1.51.2/golangci-lint-1.51.2-windows-amd64.zip: aac163d9bf3f79457399c2852cfae550cd250f23df9b324966f9c54e767ff42d + https://github.com/golangci/golangci-lint/releases/download/v1.54.2/golangci-lint-1.54.2-darwin-amd64.tar.gz: 925c4097eae9e035b0b052a66d0a149f861e2ab611a4e677c7ffd2d4e05b9b89 + https://github.com/golangci/golangci-lint/releases/download/v1.54.2/golangci-lint-1.54.2-darwin-arm64.tar.gz: 7b33fb1be2f26b7e3d1f3c10ce9b2b5ce6d13bb1d8468a4b2ba794f05b4445e1 + https://github.com/golangci/golangci-lint/releases/download/v1.54.2/golangci-lint-1.54.2-linux-amd64.tar.gz: 17c9ca05253efe833d47f38caf670aad2202b5e6515879a99873fabd4c7452b3 + https://github.com/golangci/golangci-lint/releases/download/v1.54.2/golangci-lint-1.54.2-windows-amd64.zip: ce17d122f3f93e0a9e52009d2c03cc1c1a1ae28338c2702a1f53eccd10a1afa3 https://github.com/goreleaser/goreleaser/releases/download/v1.18.2/goreleaser_Darwin_arm64.tar.gz: 7eec9f4d0b86b2c9c9f6af1770a11315998bd4d4617633b0a73eeb036e97393e https://github.com/goreleaser/goreleaser/releases/download/v1.18.2/goreleaser_Darwin_x86_64.tar.gz: 95338eed333347152e23837b68a8c6ce0c62b9f5abb68bd5b4b08178766400b9 https://github.com/goreleaser/goreleaser/releases/download/v1.18.2/goreleaser_Linux_x86_64.tar.gz: 811e0c63e347f78f3c8612a19ca8eeb564eb45f0265ce3f38aec39c8fdbcfa10 From b5dfb7f20615ef1e4611dd36271530c78ba47d19 Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 21 Aug 2023 13:42:13 -0500 Subject: [PATCH 5/7] use "slices" --- cmd/bindown/supportedsystem.go | 2 +- go.mod | 1 - go.sum | 2 -- internal/bindown/dependency.go | 2 +- internal/bindown/util.go | 18 +++++++++----- internal/builddep/builddep.go | 43 +++++++++++++++++----------------- internal/builddep/depgroup.go | 2 +- internal/builddep/dlfile.go | 7 ++++-- 8 files changed, 42 insertions(+), 35 deletions(-) diff --git a/cmd/bindown/supportedsystem.go b/cmd/bindown/supportedsystem.go index 0f67577..bd41eb4 100644 --- a/cmd/bindown/supportedsystem.go +++ b/cmd/bindown/supportedsystem.go @@ -2,9 +2,9 @@ package main import ( "fmt" + "slices" "github.com/willabides/bindown/v4/internal/bindown" - "golang.org/x/exp/slices" ) type supportedSystemCmd struct { diff --git a/go.mod b/go.mod index a0a6ee6..e65e63d 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,6 @@ require ( github.com/santhosh-tekuri/jsonschema/v5 v5.3.0 github.com/stretchr/testify v1.7.1 github.com/willabides/kongplete v0.3.0 - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 golang.org/x/oauth2 v0.8.0 golang.org/x/sync v0.2.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index 35a06a0..5353d5d 100644 --- a/go.sum +++ b/go.sum @@ -211,8 +211,6 @@ golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/internal/bindown/dependency.go b/internal/bindown/dependency.go index b17a05b..bf4e833 100644 --- a/internal/bindown/dependency.go +++ b/internal/bindown/dependency.go @@ -5,9 +5,9 @@ import ( "maps" "os" "path/filepath" + "slices" "github.com/Masterminds/semver/v3" - "golang.org/x/exp/slices" ) type DependencyOverride struct { diff --git a/internal/bindown/util.go b/internal/bindown/util.go index 0d876e5..f0706d2 100644 --- a/internal/bindown/util.go +++ b/internal/bindown/util.go @@ -12,12 +12,12 @@ import ( "maps" "os" "path/filepath" + "slices" "strings" "text/template" "github.com/Masterminds/semver/v3" ignore "github.com/sabhiram/go-gitignore" - "golang.org/x/exp/slices" "gopkg.in/yaml.v3" ) @@ -203,18 +203,24 @@ func SortBySemverOrString(vals []string) { // descending order only if all values are semvers if len(vals) == len(semvers) { - slices.SortFunc(vals, func(a, b string) bool { - return semvers[a].GreaterThan(semvers[b]) + slices.SortFunc(vals, func(a, b string) int { + return semvers[b].Compare(semvers[a]) }) return } - slices.SortFunc(vals, func(a, b string) bool { + slices.SortFunc(vals, func(a, b string) int { aVer, bVer := semvers[a], semvers[b] if aVer == nil || bVer == nil { - return a < b + if a == b { + return 0 + } + if a < b { + return -1 + } + return 1 } - return aVer.LessThan(bVer) + return aVer.Compare(bVer) }) } diff --git a/internal/builddep/builddep.go b/internal/builddep/builddep.go index 7591496..3acd95f 100644 --- a/internal/builddep/builddep.go +++ b/internal/builddep/builddep.go @@ -3,12 +3,13 @@ package builddep import ( "context" "fmt" + "slices" + "sort" "strings" "github.com/Masterminds/semver/v3" "github.com/google/go-github/v52/github" "github.com/willabides/bindown/v4/internal/bindown" - "golang.org/x/exp/slices" "golang.org/x/oauth2" "gopkg.in/yaml.v3" ) @@ -138,8 +139,8 @@ func osSubs(systems []bindown.System) []systemSub { subs = append(subs, systemSub{val: dist.OS(), normalized: dist.OS()}) } } - slices.SortFunc(subs, func(a, b systemSub) bool { - return len(a.val) > len(b.val) + sort.Slice(subs, func(i, j int) bool { + return len(subs[i].val) > len(subs[j].val) }) return subs } @@ -175,8 +176,8 @@ func archSubs(systems []bindown.System) []systemSub { subs = append(subs, systemSub{val: dist.Arch(), normalized: dist.Arch()}) } } - slices.SortFunc(subs, func(a, b systemSub) bool { - return len(a.val) > len(b.val) + sort.Slice(subs, func(i, j int) bool { + return len(subs[i].val) > len(subs[j].val) }) return subs } @@ -340,8 +341,8 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b continue } // remove all but the highest priority - slices.SortFunc(systemFiles[system], func(a, b *dlFile) bool { - return a.priority > b.priority + sort.Slice(systemFiles[system], func(i, j int) bool { + return systemFiles[system][i].priority > systemFiles[system][j].priority }) cutOff := slices.IndexFunc(systemFiles[system], func(f *dlFile) bool { return f.priority < systemFiles[system][0].priority @@ -363,8 +364,8 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b continue } // prefer templates that are used more often - slices.SortFunc(systemFiles[system], func(a, b *dlFile) bool { - return urlFrequency[a.url] > urlFrequency[b.url] + sort.Slice(systemFiles[system], func(i, j int) bool { + return urlFrequency[systemFiles[system][i].url] > urlFrequency[systemFiles[system][j].url] }) cutOff := slices.IndexFunc(systemFiles[system], func(f *dlFile) bool { return urlFrequency[f.url] < urlFrequency[systemFiles[system][0].url] @@ -400,15 +401,15 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b systemFiles[system] = sf } // now arbitrarily pick the first one alphabetically by origUrl - slices.SortFunc(sf, func(a, b *dlFile) bool { - return a.origUrl < b.origUrl + sort.Slice(sf, func(i, j int) bool { + return sf[i].origUrl < sf[j].origUrl }) systemFiles[system] = sf[:1] } templates := bindown.MapKeys(urlFrequency) - slices.SortFunc(templates, func(a, b string) bool { - return urlFrequency[a] > urlFrequency[b] + sort.Slice(templates, func(i, j int) bool { + return urlFrequency[templates[i]] > urlFrequency[templates[j]] }) // special handling to remap darwin/arm64 to darwin/amd64 @@ -421,16 +422,16 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b var groups []*depGroup systems := bindown.MapKeys(systemFiles) - slices.SortFunc(systems, func(a, b bindown.System) bool { - if len(systemFiles[a]) == 0 || len(systemFiles[b]) == 0 { - return len(systemFiles[a]) > 0 + sort.Slice(systems, func(i, j int) bool { + if len(systemFiles[systems[i]]) == 0 || len(systemFiles[systems[j]]) == 0 { + return len(systemFiles[systems[i]]) > 0 } - aFile := systemFiles[a][0] - bFile := systemFiles[b][0] + aFile := systemFiles[systems[i]][0] + bFile := systemFiles[systems[j]][0] if aFile.priority != bFile.priority { return aFile.priority > bFile.priority } - return a < b + return systems[i] < systems[j] }) for _, system := range systems { file := systemFiles[system][0] @@ -451,8 +452,8 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b group.addFile(file, binName) groups = append(groups, group) } - slices.SortFunc(groups, func(a, b *depGroup) bool { - return len(a.files) > len(b.files) + sort.Slice(groups, func(i, j int) bool { + return len(groups[i].files) > len(groups[j].files) }) return groups } diff --git a/internal/builddep/depgroup.go b/internal/builddep/depgroup.go index babdba0..8ea0edc 100644 --- a/internal/builddep/depgroup.go +++ b/internal/builddep/depgroup.go @@ -5,9 +5,9 @@ import ( "fmt" "maps" "path" + "slices" "github.com/willabides/bindown/v4/internal/bindown" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" ) diff --git a/internal/builddep/dlfile.go b/internal/builddep/dlfile.go index 5ff86c0..0cc84d0 100644 --- a/internal/builddep/dlfile.go +++ b/internal/builddep/dlfile.go @@ -11,11 +11,12 @@ import ( "net/http" "net/url" "path" + "slices" + "sort" "strings" "github.com/mholt/archiver/v4" "github.com/willabides/bindown/v4/internal/bindown" - "golang.org/x/exp/slices" ) type dlFile struct { @@ -115,7 +116,9 @@ func (f *dlFile) setArchiveFiles(ctx context.Context, binName, version string) e if err != nil { return err } - slices.SortFunc(f.archiveFiles, archiveFileLess) + sort.Slice(f.archiveFiles, func(i, j int) bool { + return archiveFileLess(f.archiveFiles[i], f.archiveFiles[j]) + }) // read remaining bytes to calculate hash _, err = io.Copy(io.Discard, reader) if err != nil { From ecbf890c58202ad08093300e9827af51dd37f7bf Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 21 Aug 2023 14:59:07 -0500 Subject: [PATCH 6/7] use slices.Sort instead of sort.Slice --- cmd/bindown/completion.go | 4 +-- cmd/bindown/completion_test.go | 4 +-- cmd/bindown/templatesource.go | 4 +-- internal/bindown/config.go | 10 +++---- internal/builddep/archivefile.go | 46 +++++++++++++++++++++----------- internal/builddep/builddep.go | 46 +++++++++++++++----------------- internal/builddep/dlfile.go | 5 +--- 7 files changed, 61 insertions(+), 58 deletions(-) diff --git a/cmd/bindown/completion.go b/cmd/bindown/completion.go index ffaf9ae..35d0642 100644 --- a/cmd/bindown/completion.go +++ b/cmd/bindown/completion.go @@ -3,7 +3,7 @@ package main import ( "context" "os" - "sort" + "slices" "strings" "github.com/alecthomas/kong" @@ -84,7 +84,7 @@ func allDependencies(cfg *bindown.Config) []string { } dependencies = append(dependencies, bn) } - sort.Strings(dependencies) + slices.Sort(dependencies) return dependencies } diff --git a/cmd/bindown/completion_test.go b/cmd/bindown/completion_test.go index 3bbb049..db94c5a 100644 --- a/cmd/bindown/completion_test.go +++ b/cmd/bindown/completion_test.go @@ -5,7 +5,7 @@ import ( "io" "os" "path/filepath" - "sort" + "slices" "testing" "github.com/posener/complete" @@ -85,7 +85,7 @@ func Test_binCompleter(t *testing.T) { configFile := createConfigFile(t, "ex1.yaml") setConfigFileEnvVar(t, configFile) got = binCompleter(ctx).Predict(complete.Args{}) - sort.Strings(got) + slices.Sort(got) require.Equal(t, []string{"golangci-lint", "goreleaser"}, got) } diff --git a/cmd/bindown/templatesource.go b/cmd/bindown/templatesource.go index b7d0029..6e1c93a 100644 --- a/cmd/bindown/templatesource.go +++ b/cmd/bindown/templatesource.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "sort" + "slices" "text/tabwriter" "github.com/willabides/bindown/v4/internal/bindown" @@ -23,7 +23,7 @@ func (c *templateSourceListCmd) Run(ctx *runContext) error { } w := tabwriter.NewWriter(ctx.stdout, 0, 0, 1, ' ', 0) sourceNames := bindown.MapKeys(cfg.TemplateSources) - sort.Strings(sourceNames) + slices.Sort(sourceNames) for _, name := range sourceNames { fmt.Fprintln(w, name+"\t"+cfg.TemplateSources[name]) } diff --git a/internal/bindown/config.go b/internal/bindown/config.go index bf66355..959ff71 100644 --- a/internal/bindown/config.go +++ b/internal/bindown/config.go @@ -12,7 +12,7 @@ import ( "os" "path" "path/filepath" - "sort" + "slices" "strings" "github.com/willabides/bindown/v4/internal/cache" @@ -554,7 +554,7 @@ func (c *Config) templatesList() []string { for tmpl := range c.Templates { templates = append(templates, tmpl) } - sort.Strings(templates) + slices.Sort(templates) return templates } @@ -622,11 +622,7 @@ func (c *Config) WriteFile(outputJSON bool) (errOut error) { return err } defer deferErr(&errOut, file.Close) - if len(c.Systems) > 0 { - sort.Slice(c.Systems, func(i, j int) bool { - return c.Systems[i] < c.Systems[j] - }) - } + slices.Sort(c.Systems) if outputJSON { encoder := json.NewEncoder(file) encoder.SetIndent("", " ") diff --git a/internal/builddep/archivefile.go b/internal/builddep/archivefile.go index 36379fb..635102c 100644 --- a/internal/builddep/archivefile.go +++ b/internal/builddep/archivefile.go @@ -1,6 +1,7 @@ package builddep import ( + "cmp" "fmt" "strings" @@ -16,28 +17,41 @@ type archiveFile struct { containsBin bool } -// archiveFileLess puts executables first, +// compBool compares bools with false < true +func compBool(a, b bool) int { + if a == b { + return 0 + } + if a { + return 1 + } + return -1 +} + +// archiveFileComp sorts archive files in the order they should be selected +// puts executables first, // then containsBin, // then the most templated files, -// then the shortest path, then alphabetically -func archiveFileLess(a, b *archiveFile) bool { - if a.executable != b.executable { - return a.executable +// then the shortest path +// then alphabetically +func archiveFileComp(a, b *archiveFile) int { + c := compBool(b.executable, a.executable) + if c != 0 { + return c } - if a.containsBin != b.containsBin { - return a.containsBin + c = compBool(b.containsBin, a.containsBin) + if c != 0 { + return c } - fTmpls := strings.Count(a.name, "{{") - otherTmpls := strings.Count(b.name, "{{") - if fTmpls != otherTmpls { - return fTmpls > otherTmpls + c = cmp.Compare(b.tmplCount, a.tmplCount) + if c != 0 { + return c } - fSlashes := strings.Count(a.origName, "/") - otherSlashes := strings.Count(b.origName, "/") - if fSlashes != otherSlashes { - return fSlashes < otherSlashes + c = cmp.Compare(strings.Count(a.origName, "/"), strings.Count(b.origName, "/")) + if c != 0 { + return c } - return a.origName < b.origName + return cmp.Compare(a.origName, b.origName) } // archiveFileGroupable returns true if a and b can be in the same top-level dependency diff --git a/internal/builddep/builddep.go b/internal/builddep/builddep.go index 3acd95f..c0b8220 100644 --- a/internal/builddep/builddep.go +++ b/internal/builddep/builddep.go @@ -1,10 +1,10 @@ package builddep import ( + "cmp" "context" "fmt" "slices" - "sort" "strings" "github.com/Masterminds/semver/v3" @@ -139,8 +139,8 @@ func osSubs(systems []bindown.System) []systemSub { subs = append(subs, systemSub{val: dist.OS(), normalized: dist.OS()}) } } - sort.Slice(subs, func(i, j int) bool { - return len(subs[i].val) > len(subs[j].val) + slices.SortFunc(subs, func(a, b systemSub) int { + return cmp.Compare(len(b.val), len(a.val)) }) return subs } @@ -176,8 +176,8 @@ func archSubs(systems []bindown.System) []systemSub { subs = append(subs, systemSub{val: dist.Arch(), normalized: dist.Arch()}) } } - sort.Slice(subs, func(i, j int) bool { - return len(subs[i].val) > len(subs[j].val) + slices.SortFunc(subs, func(a, b systemSub) int { + return cmp.Compare(len(b.val), len(a.val)) }) return subs } @@ -341,8 +341,8 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b continue } // remove all but the highest priority - sort.Slice(systemFiles[system], func(i, j int) bool { - return systemFiles[system][i].priority > systemFiles[system][j].priority + slices.SortFunc(systemFiles[system], func(a, b *dlFile) int { + return cmp.Compare(b.priority, a.priority) }) cutOff := slices.IndexFunc(systemFiles[system], func(f *dlFile) bool { return f.priority < systemFiles[system][0].priority @@ -364,8 +364,8 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b continue } // prefer templates that are used more often - sort.Slice(systemFiles[system], func(i, j int) bool { - return urlFrequency[systemFiles[system][i].url] > urlFrequency[systemFiles[system][j].url] + slices.SortFunc(systemFiles[system], func(a, b *dlFile) int { + return cmp.Compare(urlFrequency[b.url], urlFrequency[a.url]) }) cutOff := slices.IndexFunc(systemFiles[system], func(f *dlFile) bool { return urlFrequency[f.url] < urlFrequency[systemFiles[system][0].url] @@ -401,17 +401,12 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b systemFiles[system] = sf } // now arbitrarily pick the first one alphabetically by origUrl - sort.Slice(sf, func(i, j int) bool { - return sf[i].origUrl < sf[j].origUrl + slices.SortFunc(sf, func(a, b *dlFile) int { + return cmp.Compare(a.origUrl, b.origUrl) }) systemFiles[system] = sf[:1] } - templates := bindown.MapKeys(urlFrequency) - sort.Slice(templates, func(i, j int) bool { - return urlFrequency[templates[i]] > urlFrequency[templates[j]] - }) - // special handling to remap darwin/arm64 to darwin/amd64 if len(systemFiles["darwin/amd64"]) > 0 && len(systemFiles["darwin/arm64"]) == 0 && slices.Contains(allowedSystems, "darwin/arm64") { f := systemFiles["darwin/amd64"][0].clone() @@ -422,16 +417,17 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b var groups []*depGroup systems := bindown.MapKeys(systemFiles) - sort.Slice(systems, func(i, j int) bool { - if len(systemFiles[systems[i]]) == 0 || len(systemFiles[systems[j]]) == 0 { - return len(systemFiles[systems[i]]) > 0 + + slices.SortFunc(systems, func(a, b bindown.System) int { + if len(systemFiles[a]) == 0 || len(systemFiles[b]) == 0 { + return cmp.Compare(len(systemFiles[b]), len(systemFiles[a])) } - aFile := systemFiles[systems[i]][0] - bFile := systemFiles[systems[j]][0] + aFile := systemFiles[a][0] + bFile := systemFiles[b][0] if aFile.priority != bFile.priority { - return aFile.priority > bFile.priority + return cmp.Compare(bFile.priority, aFile.priority) } - return systems[i] < systems[j] + return cmp.Compare(a, b) }) for _, system := range systems { file := systemFiles[system][0] @@ -452,8 +448,8 @@ func parseDownloads(dlUrls []string, binName, version string, allowedSystems []b group.addFile(file, binName) groups = append(groups, group) } - sort.Slice(groups, func(i, j int) bool { - return len(groups[i].files) > len(groups[j].files) + slices.SortFunc(groups, func(a, b *depGroup) int { + return cmp.Compare(len(a.files), len(b.files)) }) return groups } diff --git a/internal/builddep/dlfile.go b/internal/builddep/dlfile.go index 0cc84d0..9279c67 100644 --- a/internal/builddep/dlfile.go +++ b/internal/builddep/dlfile.go @@ -12,7 +12,6 @@ import ( "net/url" "path" "slices" - "sort" "strings" "github.com/mholt/archiver/v4" @@ -116,9 +115,7 @@ func (f *dlFile) setArchiveFiles(ctx context.Context, binName, version string) e if err != nil { return err } - sort.Slice(f.archiveFiles, func(i, j int) bool { - return archiveFileLess(f.archiveFiles[i], f.archiveFiles[j]) - }) + slices.SortFunc(f.archiveFiles, archiveFileComp) // read remaining bytes to calculate hash _, err = io.Copy(io.Discard, reader) if err != nil { From 8a5609e90e6fe12bcd4d9a164fa90f8b08a48a5f Mon Sep 17 00:00:00 2001 From: Will Roden Date: Mon, 21 Aug 2023 15:16:17 -0500 Subject: [PATCH 7/7] go get -u except for kong --- go.mod | 59 +++++++++++----------- go.sum | 153 ++++++++++++++++++++++++++++++++++----------------------- 2 files changed, 121 insertions(+), 91 deletions(-) diff --git a/go.mod b/go.mod index e65e63d..e8288ad 100644 --- a/go.mod +++ b/go.mod @@ -3,64 +3,63 @@ module github.com/willabides/bindown/v4 go 1.21 require ( - github.com/AlecAivazis/survey/v2 v2.3.6 - github.com/Masterminds/semver/v3 v3.1.1 + github.com/AlecAivazis/survey/v2 v2.3.7 + github.com/Masterminds/semver/v3 v3.2.1 github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 github.com/alecthomas/kong v0.7.1 github.com/creack/pty v1.1.18 github.com/google/go-github/v52 v52.0.0 - github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec + github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 github.com/invopop/jsonschema v0.7.0 github.com/mholt/archiver/v3 v3.5.1 github.com/mholt/archiver/v4 v4.0.0-alpha.8 github.com/posener/complete v1.2.3 - github.com/rogpeppe/go-internal v1.10.0 + github.com/rogpeppe/go-internal v1.11.0 github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 - github.com/santhosh-tekuri/jsonschema/v5 v5.3.0 - github.com/stretchr/testify v1.7.1 + github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 + github.com/stretchr/testify v1.8.4 github.com/willabides/kongplete v0.3.0 - golang.org/x/oauth2 v0.8.0 - golang.org/x/sync v0.2.0 + golang.org/x/oauth2 v0.11.0 + golang.org/x/sync v0.3.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect - github.com/andybalholm/brotli v1.0.4 // indirect - github.com/bodgit/plumbing v1.2.0 // indirect - github.com/bodgit/sevenzip v1.3.0 // indirect - github.com/bodgit/windows v1.0.0 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect + github.com/andybalholm/brotli v1.0.5 // indirect + github.com/bodgit/plumbing v1.3.0 // indirect + github.com/bodgit/sevenzip v1.4.3 // indirect + github.com/bodgit/windows v1.0.1 // indirect github.com/cloudflare/circl v1.3.3 // indirect - github.com/connesc/cipherio v0.2.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect + github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/klauspost/compress v1.15.9 // indirect - github.com/klauspost/pgzip v1.2.5 // indirect - github.com/mattn/go-colorable v0.1.2 // indirect - github.com/mattn/go-isatty v0.0.8 // indirect - github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/nwaples/rardecode v1.1.2 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/pgzip v1.2.6 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect + github.com/nwaples/rardecode v1.1.3 // indirect github.com/nwaples/rardecode/v2 v2.0.0-beta.2 // indirect - github.com/pierrec/lz4/v4 v4.1.15 // indirect + github.com/pierrec/lz4/v4 v4.1.18 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab // indirect github.com/therootcompany/xz v1.0.1 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect - go4.org v0.0.0-20200411211856-f5505b9728dd // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + go4.org v0.0.0-20230225012048-214862532bf5 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index 5353d5d..73b0a4e 100644 --- a/go.sum +++ b/go.sum @@ -15,16 +15,16 @@ cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AlecAivazis/survey/v2 v2.3.6 h1:NvTuVHISgTHEHeBFqt6BHOe4Ny/NwGZr7w+F8S9ziyw= -github.com/AlecAivazis/survey/v2 v2.3.6/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI= +github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= +github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= +github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs= +github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA= github.com/alecthomas/kong v0.7.1 h1:azoTh0IOfwlAX3qN9sHWTxACE2oV8Bg2gAwBsMwDQY4= @@ -32,25 +32,22 @@ github.com/alecthomas/kong v0.7.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqr github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE= github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/bodgit/plumbing v1.2.0 h1:gg4haxoKphLjml+tgnecR4yLBV5zo4HAZGCtAh3xCzM= -github.com/bodgit/plumbing v1.2.0/go.mod h1:b9TeRi7Hvc6Y05rjm8VML3+47n4XTZPtQ/5ghqic2n8= -github.com/bodgit/sevenzip v1.3.0 h1:1ljgELgtHqvgIp8W8kgeEGHIWP4ch3xGI8uOBZgLVKY= -github.com/bodgit/sevenzip v1.3.0/go.mod h1:omwNcgZTEooWM8gA/IJ2Nk/+ZQ94+GsytRzOJJ8FBlM= -github.com/bodgit/windows v1.0.0 h1:rLQ/XjsleZvx4fR1tB/UxQrK+SJ2OFHzfPjLWWOhDIA= -github.com/bodgit/windows v1.0.0/go.mod h1:a6JLwrB4KrTR5hBpp8FI9/9W9jJfeQ2h4XDXU74ZCdM= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= +github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/bodgit/plumbing v1.3.0 h1:pf9Itz1JOQgn7vEOE7v7nlEfBykYqvUYioC61TwWCFU= +github.com/bodgit/plumbing v1.3.0/go.mod h1:JOTb4XiRu5xfnmdnDJo6GmSbSbtSyufrsyZFByMtKEs= +github.com/bodgit/sevenzip v1.4.3 h1:46Rb9vCYdpceC1U+GIR0bS3hP2/Xv8coKFDeLJySV/A= +github.com/bodgit/sevenzip v1.4.3/go.mod h1:F8n3+0CwbdxqmNy3wFeOAtanza02Ur66AGfs/hbYblI= +github.com/bodgit/windows v1.0.1 h1:tF7K6KOluPYygXa3Z2594zxlkbKPAOvqr97etrGNIz4= +github.com/bodgit/windows v1.0.1/go.mod h1:a6JLwrB4KrTR5hBpp8FI9/9W9jJfeQ2h4XDXU74ZCdM= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= -github.com/connesc/cipherio v0.2.1 h1:FGtpTPMbKNNWByNrr9aEBtaJtXjqOzkIXNYJp6OEycw= -github.com/connesc/cipherio v0.2.1/go.mod h1:ukY0MWJDFnJEbXMQtOcn2VmTpRfzcTz4OoVrWGGJZcA= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= @@ -72,15 +69,13 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -115,10 +110,12 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= +github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 h1:AgcIVYPa6XJnU3phs104wLj8l5GEththEw6+F79YsIY= +github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/invopop/jsonschema v0.7.0 h1:2vgQcBz1n256N+FpX3Jq7Y17AjYt46Ig3zIWyy770So= github.com/invopop/jsonschema v0.7.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= @@ -129,34 +126,39 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:C github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= +github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -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.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4= github.com/mholt/archiver/v4 v4.0.0-alpha.8 h1:tRGQuDVPh66WCOelqe6LIGh0gwmfwxUrSSDunscGsRM= github.com/mholt/archiver/v4 v4.0.0-alpha.8/go.mod h1:5f7FUYGXdJWUjESffJaYR4R60VhnHxb2X3T1teMyv5A= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= -github.com/nwaples/rardecode v1.1.2 h1:Cj0yZY6T1Zx1R7AhTbyGSALm44/Mmq+BAPc4B/p/d3M= -github.com/nwaples/rardecode v1.1.2/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= +github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc= +github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nwaples/rardecode/v2 v2.0.0-beta.2 h1:e3mzJFJs4k83GXBEiTaQ5HgSc/kOK8q0rDaRO0MPaOk= github.com/nwaples/rardecode/v2 v2.0.0-beta.2/go.mod h1:yntwv/HfMc/Hbvtq9I19D1n58te3h6KsqCf3GxyfBGY= github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= -github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -167,19 +169,24 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab h1:ZjX6I48eZSFetPb41dHudEyVr5v953N15TsNZXlkcWY= github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab/go.mod h1:/PfPXh0EntGc3QAAyUaviy4S9tzy4Zp0e2ilq4voC6E= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/santhosh-tekuri/jsonschema/v5 v5.3.0 h1:uIkTLo0AGRc8l7h5l9r+GcYi9qfVPt6lD4/bhmzfiKo= -github.com/santhosh-tekuri/jsonschema/v5 v5.3.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/therootcompany/xz v1.0.1 h1:CmOtsn1CbtmyYiusbfmhmkpAAETj0wBIH6kCYaX+xzw= github.com/therootcompany/xz v1.0.1/go.mod h1:3K3UH1yCKgBneZYhuQUvJ9HPD19UEXEI0BWbMn8qNMY= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -190,19 +197,22 @@ github.com/willabides/kongplete v0.3.0 h1:8dJZ0r2a2YnSdYCQk9TjQDKzLrj1zUvIOPIG3b github.com/willabides/kongplete v0.3.0/go.mod h1:VPdrG6LY+tP0LMkSBuTgIQ8c6+P8wvIDHVJzDdDh9Fw= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU= -go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= +go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= +go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -228,6 +238,8 @@ golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKG golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -241,25 +253,31 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -273,24 +291,35 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -317,6 +346,8 @@ golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -357,8 +388,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=