Skip to content

Commit 881b2fe

Browse files
authored
Merge pull request #66 from crazy-max/go-1.24
update go to 1.24 and golangci-lint to 2.1.5
2 parents 7fde0e5 + a42702d commit 881b2fe

File tree

9 files changed

+80
-26
lines changed

9 files changed

+80
-26
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
name: Set up Go
6666
uses: actions/setup-go@v5
6767
with:
68-
go-version: "1.23"
68+
go-version: "1.24"
6969
-
7070
name: Download modules
7171
run: |

.golangci.yml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
1-
run:
2-
timeout: 10m
1+
version: "2"
32

43
linters:
4+
default: none
55
enable:
66
- depguard
7-
- gofmt
8-
- goimports
97
- revive
108
- govet
119
- importas
1210
- ineffassign
1311
- misspell
14-
- typecheck
1512
- errname
1613
- makezero
1714
- whitespace
18-
disable-all: true
19-
20-
linters-settings:
21-
depguard:
15+
settings:
16+
depguard:
17+
rules:
18+
main:
19+
deny:
20+
- pkg: io/ioutil
21+
desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil
22+
importas:
23+
no-unaliased: true
24+
exclusions:
25+
generated: lax
2226
rules:
23-
main:
24-
deny:
25-
- pkg: io/ioutil
26-
desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil
27-
importas:
28-
no-unaliased: true
27+
- linters:
28+
- revive
29+
text: stutters
30+
31+
formatters:
32+
enable:
33+
- gofmt
34+
- goimports
2935

3036
issues:
31-
exclude-rules:
32-
- linters:
33-
- revive
34-
text: "stutters"
37+
max-issues-per-linter: 0
38+
max-same-issues: 0

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
ARG GO_VERSION="1.23"
17+
ARG GO_VERSION="1.24"
1818
ARG XX_VERSION="1.6.1"
19-
ARG GOLANGCI_LINT_VERSION="v1.62"
19+
ARG GOLANGCI_LINT_VERSION="v2.1.5"
2020
ARG ADDLICENSE_VERSION="v1.1.1"
2121

2222
ARG LICENSE_ARGS="-c cli-docs-tool -l apache"

annotation/annotation.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package annotation handles annotations for CLI commands.
1516
package annotation
1617

1718
const (

clidocstool.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package clidocstool provides tools for generating CLI documentation.
1516
package clidocstool
1617

1718
import (

clidocstool_yaml.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ func genFlagResult(cmd *cobra.Command, flags *pflag.FlagSet, anchors map[string]
352352
//
353353
// This makes the generated YAML more readable, and easier to review changes.
354354
// max can be used to customize the width to keep the whole line < 80 chars.
355-
func forceMultiLine(s string, max int) string {
355+
func forceMultiLine(s string, maxWidth int) string {
356356
s = strings.TrimSpace(s)
357-
if len(s) > max && !strings.Contains(s, "\n") {
357+
if len(s) > maxWidth && !strings.Contains(s, "\n") {
358358
s = s + "\n"
359359
}
360360
return s

example/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/docker/cli-docs-tool/example
22

3-
go 1.20
3+
go 1.23.0
44

55
require (
66
github.com/docker/buildx v0.11.2

example/go.sum

Lines changed: 48 additions & 0 deletions
Large diffs are not rendered by default.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/docker/cli-docs-tool
22

3-
go 1.18
3+
go 1.23.0
44

55
require (
66
github.com/spf13/cobra v1.8.1

0 commit comments

Comments
 (0)