Skip to content

Commit

Permalink
bump to go 1.20 and deps (#56)
Browse files Browse the repository at this point in the history
* bump to go 1.20 and deps

* fix versions

* more lint fixes
  • Loading branch information
onyxraven authored Apr 20, 2023
1 parent a72be1d commit 254fcfb
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.50.0
version: "v1.52.2"

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch all tags
Expand All @@ -32,12 +32,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- name: mod download
run: go mod download && go build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: us-east-1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch all tags
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- name: mod download
run: go mod download && go build

Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
golang 1.19
golang 1.20
2 changes: 1 addition & 1 deletion cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {
}

// AddCommand the command for the add command
func AddCommand(cmd *cobra.Command, args []string) error {
func AddCommand(_ *cobra.Command, args []string) error {
initConfig()

for _, fileArg := range args {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cat.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func init() {
}

// CatCommand prints a file to stdout
func CatCommand(cmd *cobra.Command, args []string) error {
func CatCommand(_ *cobra.Command, args []string) error {
initConfig()

for _, fileArg := range args {
Expand Down
2 changes: 1 addition & 1 deletion cmd/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func init() {
}

// CleanCommand cleans up files
func CleanCommand(cmd *cobra.Command, args []string) error {
func CleanCommand(_ *cobra.Command, args []string) error {
initConfig()

filesToClean, err := fileutil.SomeOrAllFiles(args, sopsConfig.EncryptedFiles)
Expand Down
2 changes: 1 addition & 1 deletion cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func init() {
}

// CompletionCommand the command for the add command
func CompletionCommand(cmd *cobra.Command, args []string) error {
func CompletionCommand(_ *cobra.Command, _ []string) error {
switch shellType {
case "bash":
return RootCmd.GenBashCompletion(os.Stdout)
Expand Down
2 changes: 1 addition & 1 deletion cmd/decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func init() {
}

// DecryptCommand decrypts files
func DecryptCommand(cmd *cobra.Command, args []string) error {
func DecryptCommand(_ *cobra.Command, args []string) error {
initConfig()

filesToDecrypt, err := fileutil.SomeOrAllFiles(args, sopsConfig.EncryptedFiles)
Expand Down
2 changes: 1 addition & 1 deletion cmd/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func init() {
}

// DocsCommand the command for the add command
func DocsCommand(cmd *cobra.Command, args []string) error {
func DocsCommand(_ *cobra.Command, _ []string) error {
err := doc.GenMarkdownTree(RootCmd, "./docs")
if err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func init() {
}

// EditCommand edit a file
func EditCommand(cmd *cobra.Command, args []string) error {
func EditCommand(_ *cobra.Command, args []string) error {
initConfig()

fn := fileutil.NormalizeToPlaintextFile(args[0])
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {
}

// ListCommand the command for the list command
func ListCommand(cmd *cobra.Command, args []string) {
func ListCommand(_ *cobra.Command, _ []string) {
initConfig()

for _, fn := range sopsConfig.EncryptedFiles {
Expand Down
2 changes: 1 addition & 1 deletion cmd/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func init() {
}

// RemoveCommand the command for the add command
func RemoveCommand(cmd *cobra.Command, args []string) error {
func RemoveCommand(_ *cobra.Command, args []string) error {
initConfig()

for _, fileArg := range args {
Expand Down
2 changes: 1 addition & 1 deletion cmd/rotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func init() {
}

// RotateCommand Rotates up files
func RotateCommand(cmd *cobra.Command, args []string) error {
func RotateCommand(_ *cobra.Command, args []string) error {
initConfig()

filesToRotate, err := fileutil.SomeOrAllFiles(args, sopsConfig.EncryptedFiles)
Expand Down
2 changes: 1 addition & 1 deletion cmd/updatekeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {
}

// UpdateKeysCommand updates recipients keys
func UpdateKeysCommand(cmd *cobra.Command, args []string) error {
func UpdateKeysCommand(_ *cobra.Command, args []string) error {
initConfig()
var extraArgs []string

Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {
}

// VersionCommand prints the version
func VersionCommand(cmd *cobra.Command, args []string) {
func VersionCommand(_ *cobra.Command, _ []string) {
if shortString {
fmt.Println(BuildVersion)
} else {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/golang/mock v1.6.0
github.com/mozilla-services/yaml v0.0.0-20201007153854-c369669a6625
github.com/spf13/cobra v1.6.1
github.com/spf13/cobra v1.7.0
)

require (
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHH
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/mozilla-services/yaml v0.0.0-20201007153854-c369669a6625 h1:5IeGQzguDQ+EsTR5HE7tMYkZe09mqQ9cDypdKQEB5Kg=
github.com/mozilla-services/yaml v0.0.0-20201007153854-c369669a6625/go.mod h1:Is/Ucts/yU/mWyGR8yELRoO46mejouKsJfQLAIfTR18=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
Expand Down

0 comments on commit 254fcfb

Please sign in to comment.