Skip to content

Commit d0588f0

Browse files
authored
fix: convert uint as pointer of uint for the migration (#5755)
1 parent c77bb6b commit d0588f0

File tree

7 files changed

+47
-14
lines changed

7 files changed

+47
-14
lines changed

pkg/commands/internal/migrate/cloner/cloner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func convertType(expr ast.Expr) ast.Expr {
142142
}
143143

144144
switch ident.Name {
145-
case "bool", "string", "int", "int8", "int16", "int32", "int64", "float32", "float64":
145+
case "bool", "string", "uint", "uint8", "uint16", "uint32", "uint64", "int", "int8", "int16", "int32", "int64", "float32", "float64":
146146
return &ast.StarExpr{X: ident}
147147

148148
default:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: "2"
2+
3+
linters:
4+
settings:
5+
nakedret:
6+
max-func-lines: 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
issues:
2+
# Only to not generate unrelated elements inside golden.
3+
exclude-use-default: false
4+
# Only to not generate unrelated elements inside golden.
5+
exclude-generated: strict
6+
# Only to not generate unrelated elements inside golden.
7+
exclude-dirs-use-default: false
8+
9+
linters-settings:
10+
nakedret:
11+
max-func-lines: 0

pkg/commands/internal/migrate/versionone/linters_settings.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ type MustTagSettings struct {
489489
}
490490

491491
type NakedretSettings struct {
492-
MaxFuncLines uint `mapstructure:"max-func-lines"`
492+
MaxFuncLines *uint `mapstructure:"max-func-lines"`
493493
}
494494

495495
type NestifSettings struct {

pkg/commands/internal/migrate/versiontwo/formatters.go

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/commands/internal/migrate/versiontwo/linters_settings.go

+23-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/commands/internal/migrate/versiontwo/output.go

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)