Skip to content

Commit

Permalink
chore: bump Go to 1.23 (#856)
Browse files Browse the repository at this point in the history
* chore: bump go to 1.23

* ci: update golangci-lint
  • Loading branch information
mrexox authored Oct 23, 2024
1 parent 453d026 commit 3c959bf
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.59.0
version: v1.61.0
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ First off, thanks for taking the time to contribute! Feel free to make Pull Requ

# Requirements

Go >= 1.22.0
Go >= 1.23.0

# Process

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A Git hooks manager for Node.js, Ruby, Python and many other types of projects.

## Install

With **Go** (>= 1.22):
With **Go** (>= 1.23):

```bash
go install github.com/evilmartians/lefthook@latest
Expand Down
7 changes: 3 additions & 4 deletions cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package cmd

import (
_ "embed"
"sort"
"maps"
"slices"

"github.com/spf13/cobra"
"golang.org/x/exp/maps"

"github.com/evilmartians/lefthook/internal/config"
"github.com/evilmartians/lefthook/internal/lefthook"
Expand All @@ -24,8 +24,7 @@ func (add) New(opts *lefthook.Options) *cobra.Command {
if len(args) != 0 {
return
}
ret = maps.Keys(config.AvailableHooks)
sort.Strings(ret)
ret = slices.Sorted(maps.Keys(config.AvailableHooks))
return
}

Expand Down
7 changes: 3 additions & 4 deletions cmd/run.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package cmd

import (
"sort"
"maps"
"slices"

"github.com/spf13/cobra"
"golang.org/x/exp/maps"

"github.com/evilmartians/lefthook/internal/config"
"github.com/evilmartians/lefthook/internal/lefthook"
Expand All @@ -22,8 +22,7 @@ func (run) New(opts *lefthook.Options) *cobra.Command {
return
}
ret = lefthook.ConfigHookCompletions(opts)
other := maps.Keys(config.AvailableHooks)
sort.Strings(other)
other := slices.Sorted(maps.Keys(config.AvailableHooks))
ret = append(ret, other...)
return
}
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/evilmartians/lefthook

go 1.22
go 1.23

toolchain go1.22.3
toolchain go1.23.2

require (
github.com/MakeNowJust/heredoc v1.0.0
Expand All @@ -18,6 +18,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61
)

Expand All @@ -32,7 +33,6 @@ require (
github.com/sourcegraph/conc v0.3.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/tools v0.22.0 // indirect
)

Expand Down

0 comments on commit 3c959bf

Please sign in to comment.