Skip to content

Commit 4e70ef2

Browse files
authored
chore: fix formatter (#160)
1 parent 917de98 commit 4e70ef2

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ jobs:
4040
uses: coverallsapp/github-action@v2
4141
with:
4242
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
parallel: true
44+
flag-name: go-${{ matrix.go-version }}
4345
path-to-lcov: coverage.lcov

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ formatters:
1111
settings:
1212
gofumpt:
1313
extra-rules: true
14+
gci:
15+
sections:
16+
- standard
17+
- default
18+
- blank
19+
- dot
1420
exclusions:
1521
generated: lax
1622

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Format all files
22
fmt:
33
@echo "==> Formatting source"
4-
@gofmt -s -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
4+
@golangci-lint fmt ./...
55
@echo "==> Done"
66
.PHONY: fmt
77

http/healthz/healthz_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func TestHandler(t *testing.T) {
2727
assert.Equal(t, "", gotOutput)
2828
assert.Equal(t, `ok`, rec.Body.String())
2929
}
30+
3031
func TestHandler_Verbose(t *testing.T) {
3132
goodCheck := healthz.NamedCheck("good", func(*http.Request) error { return nil })
3233

http/ip_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func TestRealIP(t *testing.T) {
4646
RemoteAddr: "127.0.0.1",
4747
Header: http.Header{
4848
http.CanonicalHeaderKey("X-Forwarded-For"): []string{"1.2.3.4", "11.0.0.1"},
49-
http.CanonicalHeaderKey("X-Real-Ip"): []string{"5.6.7.8"}},
49+
http.CanonicalHeaderKey("X-Real-Ip"): []string{"5.6.7.8"},
50+
},
5051
},
5152
want: "1.2.3.4",
5253
},

0 commit comments

Comments
 (0)