diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3011a82..1095d84 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v7 with: - go-version: 1.26 + go-version: 1.27 - name: Build run: go build -v ./... diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index fddf075..dbdc4da 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/setup-go@v7 with: - go-version: 1.26 + go-version: 1.27 - uses: actions/checkout@v7 - name: golangci-lint uses: golangci/golangci-lint-action@v9 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index fe11ab4..3aed711 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -18,7 +18,7 @@ jobs: name: Set up Go uses: actions/setup-go@v7 with: - go-version: 1.26 + go-version: 1.27 - name: Set GOPATH # temporary fix diff --git a/.golangci.yml b/.golangci.yml index e832014..c107d38 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,3 +12,4 @@ linters: - noinlineerr - wsl - gomodguard + - exhaustruct # deprecated, replaced by exhaustruct_v5 diff --git a/cmd/edit.go b/cmd/edit.go index f1278e1..0afaf4d 100644 --- a/cmd/edit.go +++ b/cmd/edit.go @@ -11,7 +11,7 @@ import ( ) func NewEditCommand(conf *config.Config) *cobra.Command { - //nolint:exhaustruct + //nolint:exhaustruct_v5 return &cobra.Command{ Use: "edit ", Short: "Open the ADR with number in the default editor", @@ -19,7 +19,7 @@ func NewEditCommand(conf *config.Config) *cobra.Command { The editor is determined by the $EDITOR environment variable. If $EDITOR is not set, the command will fail.`, - Args: cobra.ExactArgs(1), + Args: cobra.ExactArgs(1), Run: func(_ *cobra.Command, args []string) { ctx := context.TODO() diff --git a/cmd/find.go b/cmd/find.go index 38e68b8..3ed99d6 100644 --- a/cmd/find.go +++ b/cmd/find.go @@ -13,7 +13,7 @@ func NewFindCommand(conf *config.Config) *cobra.Command { var format string - //nolint:exhaustruct + //nolint:exhaustruct_v5 cmd := &cobra.Command{ Use: "find ", Short: "Find ADRs matching a query", diff --git a/cmd/init.go b/cmd/init.go index ad03b35..5ef257b 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -9,7 +9,7 @@ import ( ) func NewInitConfigCommand() *cobra.Command { - //nolint:exhaustruct + //nolint:exhaustruct_v5 return &cobra.Command{ Use: "init [path]", Short: "Initialize the ADR path (default is `docs/adr`)", @@ -22,7 +22,7 @@ is found. The path argument sets the ADR directory relative to the project root (default: docs/adr).`, - Args: cobra.MaximumNArgs(1), + Args: cobra.MaximumNArgs(1), Run: func(_ *cobra.Command, args []string) { path := "docs/adr" @@ -45,7 +45,7 @@ The path argument sets the ADR directory relative to the project root } func NewInitCommand(conf *config.Config) *cobra.Command { - //nolint:exhaustruct + //nolint:exhaustruct_v5 return &cobra.Command{ Use: "init", Short: "Initialize the ADR path", diff --git a/cmd/list.go b/cmd/list.go index 11ccf83..329db6b 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -11,7 +11,7 @@ import ( func NewListCommand(conf *config.Config) *cobra.Command { var format string - //nolint:exhaustruct + //nolint:exhaustruct_v5 cmd := &cobra.Command{ Use: "list", Short: "List all ADRs with their id, date and status", diff --git a/cmd/new.go b/cmd/new.go index 4339b51..cf460fd 100644 --- a/cmd/new.go +++ b/cmd/new.go @@ -11,7 +11,7 @@ import ( ) func NewNewCommand(conf *config.Config) *cobra.Command { - //nolint:exhaustruct + //nolint:exhaustruct_v5 return &cobra.Command{ Use: "new [title]", Aliases: []string{"add", "create"}, diff --git a/cmd/show.go b/cmd/show.go index 45428dd..c9ba1c9 100644 --- a/cmd/show.go +++ b/cmd/show.go @@ -12,7 +12,7 @@ import ( func NewShowCommand(conf *config.Config) *cobra.Command { var format string - //nolint:exhaustruct + //nolint:exhaustruct_v5 cmd := &cobra.Command{ Use: "show ", Aliases: []string{"view"}, diff --git a/cmd/update.go b/cmd/update.go index b54ebe7..99c079c 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -11,7 +11,7 @@ import ( ) func NewUpdateCommand(conf *config.Config) *cobra.Command { - //nolint:exhaustruct + //nolint:exhaustruct_v5 return &cobra.Command{ Use: "update ", Short: "Update the ADR with number to status ", @@ -20,7 +20,7 @@ func NewUpdateCommand(conf *config.Config) *cobra.Command { Valid statuses are: proposed, accepted, deprecated, superseded. The index (README.md) is regenerated automatically after the update.`, - Args: cobra.ExactArgs(2), //nolint:mnd + Args: cobra.ExactArgs(2), //nolint:mnd Run: func(_ *cobra.Command, args []string) { number, err := strconv.Atoi(args[0]) if err != nil { diff --git a/cmd/version.go b/cmd/version.go index 6c08d70..5101598 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -9,7 +9,7 @@ import ( ) func NewVersionCommand() *cobra.Command { - //nolint:exhaustruct + //nolint:exhaustruct_v5 return &cobra.Command{ Use: "version", Short: "Show the version information", diff --git a/main.go b/main.go index fb43c34..b4031d6 100644 --- a/main.go +++ b/main.go @@ -37,7 +37,7 @@ func newRootCommand() *cobra.Command { log.Fatalf("couldn't read config: %v", err) } - //nolint:exhaustruct + //nolint:exhaustruct_v5 root := &cobra.Command{ Use: os.Args[0], Short: "A command line tool to maintain Architecture Decision Records",