diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 161689f..2309d2c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,11 +15,11 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.23.x + go-version: 1.24.x - name: Run GoReleaser (dry run) env: PACKAGE_NAME: github.com/lets-cli/lets - GOLANG_CROSS_VERSION: v1.23 + GOLANG_CROSS_VERSION: v1.24 run: | docker run \ --rm \ @@ -33,7 +33,7 @@ jobs: - name: Run GoReleaser env: PACKAGE_NAME: github.com/lets-cli/lets - GOLANG_CROSS_VERSION: v1.23 + GOLANG_CROSS_VERSION: v1.24 run: | docker run \ --rm \ diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a78c893..da74e0c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,7 +22,7 @@ jobs: - name: Setup go uses: actions/setup-go@v2 with: - go-version: 1.23.x + go-version: 1.24.x - name: Checkout code uses: actions/checkout@v2 - run: go install gotest.tools/gotestsum@latest diff --git a/Dockerfile b/Dockerfile index 5814754..36c065f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23-bookworm as builder +FROM golang:1.24-bookworm as builder ENV GOPROXY https://proxy.golang.org ENV CGO_ENABLED 1 @@ -26,6 +26,6 @@ COPY go.sum . RUN go mod download -FROM golangci/golangci-lint:v1.63.4-alpine as linter +FROM golangci/golangci-lint:v1.64.7-alpine as linter RUN mkdir -p /.cache && chmod -R 777 /.cache diff --git a/cmd/completion.go b/cmd/completion.go index b6f631f..5fd5723 100644 --- a/cmd/completion.go +++ b/cmd/completion.go @@ -184,9 +184,9 @@ func getCommandOptions(command *config.Command, out io.Writer, verbose bool) err // Returns reinit function which must be called when config is parsed. func InitCompletionCmd(rootCmd *cobra.Command, cfg *config.Config) func(cfg *config.Config) { completionCmd := &cobra.Command{ - Use: "completion", - Hidden: true, - Short: "Generates completion scripts for bash, zsh", + Use: "completion", + Hidden: true, + Short: "Generates completion scripts for bash, zsh", GroupID: "internal", RunE: func(cmd *cobra.Command, args []string) error { shellType, err := cmd.Flags().GetString("shell") diff --git a/cmd/root.go b/cmd/root.go index 5bec729..4b79f3b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -24,7 +24,7 @@ func newRootCmd(version string) *cobra.Command { // print help message manyally SilenceUsage: true, } - cmd.AddGroup(&cobra.Group{"main", "Commands:"}, &cobra.Group{"internal", "Internal commands:"}) + cmd.AddGroup(&cobra.Group{ID: "main", Title: "Commands:"}, &cobra.Group{ID: "internal", Title: "Internal commands:"}) cmd.SetHelpCommandGroupID("internal") return cmd } diff --git a/cmd/self.go b/cmd/self.go index a881a00..913652c 100644 --- a/cmd/self.go +++ b/cmd/self.go @@ -7,9 +7,9 @@ import ( // InitSelfCmd intializes root 'self' subcommand. func InitSelfCmd(rootCmd *cobra.Command, version string) { selfCmd := &cobra.Command{ - Use: "self", - Hidden: false, - Short: "Manage lets CLI itself", + Use: "self", + Hidden: false, + Short: "Manage lets CLI itself", GroupID: "internal", RunE: func(cmd *cobra.Command, args []string) error { return PrintHelpMessage(cmd) diff --git a/cmd/subcommand.go b/cmd/subcommand.go index b2d9f1e..df2f87e 100644 --- a/cmd/subcommand.go +++ b/cmd/subcommand.go @@ -157,10 +157,10 @@ func isHidden(cmdName string, showAll bool) bool { // newSubcommand creates new cobra root subcommand from config.Command. func newSubcommand(command *config.Command, conf *config.Config, showAll bool, out io.Writer) *cobra.Command { subCmd := &cobra.Command{ - Use: command.Name, - Short: short(command.Description), + Use: command.Name, + Short: short(command.Description), GroupID: "main", - Hidden: isHidden(command.Name, showAll), + Hidden: isHidden(command.Name, showAll), RunE: func(cmd *cobra.Command, args []string) error { command.Args = append(command.Args, prepareArgs(command.Name, os.Args)...) command.Cmds.AppendArgs(args) diff --git a/config/config/clone.go b/config/config/clone.go index 8eed545..1123654 100644 --- a/config/config/clone.go +++ b/config/config/clone.go @@ -1,6 +1,6 @@ package config -import "golang.org/x/exp/constraints" +import "cmp" func cloneSlice[I any](a []I) []I { if a == nil { @@ -13,7 +13,7 @@ func cloneSlice[I any](a []I) []I { return arr } -func cloneMap[K constraints.Ordered, V any](m map[K]V) map[K]V { +func cloneMap[K cmp.Ordered, V any](m map[K]V) map[K]V { if m == nil { return nil } @@ -26,7 +26,7 @@ func cloneMap[K constraints.Ordered, V any](m map[K]V) map[K]V { return mapping } -func cloneMapSlice[K constraints.Ordered, V []string](m map[K]V) map[K]V { +func cloneMapSlice[K cmp.Ordered, V []string](m map[K]V) map[K]V { if m == nil { return nil } diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 9f8d206..48d6691 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -5,6 +5,8 @@ title: Changelog ## [Unreleased](https://github.com/lets-cli/lets/releases/tag/v0.0.X) +* `[Dependency]` update go to `1.24` + ## [0.0.55](https://github.com/lets-cli/lets/releases/tag/v0.0.55) * `[Added]` `lets self` command that is ment to be a new home for all lets own commands such as `completions` (soon) or `lsp` diff --git a/go.mod b/go.mod index f052c0e..43dd3ed 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/lets-cli/lets -go 1.23 +go 1.24 require ( github.com/codeclysm/extract v2.2.0+incompatible diff --git a/lets.yaml b/lets.yaml index 6cd7a18..119b876 100644 --- a/lets.yaml +++ b/lets.yaml @@ -130,4 +130,4 @@ commands: run-docs: work_dir: docs - cmd: npm start \ No newline at end of file + cmd: npm start