Skip to content

Commit 7eec8bf

Browse files
authored
chore: add support for gofmt (#4054)
1 parent 36b5a7f commit 7eec8bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ linters:
1717
- durationcheck # check for two durations multiplied together [fast: false, auto-fix: false]
1818
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false]
1919
- goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false]
20+
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true]
2021
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. [fast: true, auto-fix: true]
2122
- gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false]
2223
- goprintffuncname # Checks that printf-like functions are named with `f` at the end [fast: true, auto-fix: false]

internal/gofields/gofields_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func TestGetValue(t *testing.T) {
6767
},
6868
},
6969
Pets: map[string]*Pet{
70-
"rex": &Pet{
70+
"rex": {
7171
Animal: Animal{
7272
Species: "dog",
7373
},

0 commit comments

Comments
 (0)