Skip to content

Commit

Permalink
Merge pull request #178 from WillAbides/goup
Browse files Browse the repository at this point in the history
go 1.21
  • Loading branch information
WillAbides authored Aug 21, 2023
2 parents 4874473 + 8a5609e commit f203a7f
Show file tree
Hide file tree
Showing 17 changed files with 227 additions and 198 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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]'
Expand Down Expand Up @@ -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: |
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/labels.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions bindown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/bindown/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"context"
"os"
"sort"
"slices"
"strings"

"github.com/alecthomas/kong"
Expand Down Expand Up @@ -84,7 +84,7 @@ func allDependencies(cfg *bindown.Config) []string {
}
dependencies = append(dependencies, bn)
}
sort.Strings(dependencies)
slices.Sort(dependencies)
return dependencies
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/bindown/completion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"os"
"path/filepath"
"sort"
"slices"
"testing"

"github.com/posener/complete"
Expand Down Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/bindown/supportedsystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package main

import (
"fmt"
"slices"

"github.com/willabides/bindown/v4/internal/bindown"
"golang.org/x/exp/slices"
)

type supportedSystemCmd struct {
Expand Down
8 changes: 4 additions & 4 deletions cmd/bindown/templatesource.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package main

import (
"fmt"
"sort"
"slices"
"text/tabwriter"

"golang.org/x/exp/maps"
"github.com/willabides/bindown/v4/internal/bindown"
)

type templateSourceCmd struct {
Expand All @@ -22,8 +22,8 @@ func (c *templateSourceListCmd) Run(ctx *runContext) error {
return err
}
w := tabwriter.NewWriter(ctx.stdout, 0, 0, 1, ' ', 0)
sourceNames := maps.Keys(cfg.TemplateSources)
sort.Strings(sourceNames)
sourceNames := bindown.MapKeys(cfg.TemplateSources)
slices.Sort(sourceNames)
for _, name := range sourceNames {
fmt.Fprintln(w, name+"\t"+cfg.TemplateSources[name])
}
Expand Down
63 changes: 30 additions & 33 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,68 +1,65 @@
module github.com/willabides/bindown/v4

go 1.20
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-cmp v0.5.9
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/exp v0.0.0-20230321023759-10a507213a29
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
)
Loading

0 comments on commit f203a7f

Please sign in to comment.