Skip to content

Commit 05a35ad

Browse files
committed
ci: gofmt fixes for internal/api/http*.go
CI gofmt step caught struct-field tag alignment + comment indent in the new HTTP files. No semantic change.
1 parent 8e2c1f7 commit 05a35ad

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

internal/api/http.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ type headOut struct {
129129

130130
type logOut struct {
131131
Body struct {
132-
Head string `json:"head"`
133-
Nodes []protocol.Node `json:"nodes"`
132+
Head string `json:"head"`
133+
Nodes []protocol.Node `json:"nodes"`
134134
}
135135
}
136136

@@ -140,8 +140,8 @@ type nodeIDIn struct {
140140

141141
type showOut struct {
142142
Body struct {
143-
Parent string `json:"parent"`
144-
Changes []protocol.Change `json:"changes"`
143+
Parent string `json:"parent"`
144+
Changes []protocol.Change `json:"changes"`
145145
}
146146
}
147147

@@ -198,18 +198,18 @@ type tagsListOut struct {
198198

199199
type tournamentIn struct {
200200
Body struct {
201-
Base string `json:"base" doc:"base ref (default HEAD)"`
202-
Test string `json:"test" required:"true" doc:"test command run inside each candidate"`
203-
Candidates []protocol.TournamentCandidate `json:"candidates" required:"true" minItems:"1"`
201+
Base string `json:"base" doc:"base ref (default HEAD)"`
202+
Test string `json:"test" required:"true" doc:"test command run inside each candidate"`
203+
Candidates []protocol.TournamentCandidate `json:"candidates" required:"true" minItems:"1"`
204204
}
205205
}
206206

207207
type tournamentOut struct {
208208
Body struct {
209-
Head string `json:"head"`
210-
Winner string `json:"winner,omitempty"`
211-
WinnerNode string `json:"winner_node,omitempty"`
212-
Branches []protocol.TournamentBranch `json:"branches"`
209+
Head string `json:"head"`
210+
Winner string `json:"winner,omitempty"`
211+
WinnerNode string `json:"winner_node,omitempty"`
212+
Branches []protocol.TournamentBranch `json:"branches"`
213213
}
214214
}
215215

internal/api/http_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ func TestBearerAuth(t *testing.T) {
5454
t.Errorf("%s: got %d, want %d", name, rr.Code, wantStatus)
5555
}
5656
}
57-
check("no-token /v1/head", "GET", "/v1/head", "", 401)
58-
check("wrong-token /v1/head", "GET", "/v1/head", "Bearer nope", 401)
59-
check("right-token /v1/head", "GET", "/v1/head", "Bearer secret", 204)
60-
check("no-token /openapi.json", "GET", "/openapi.json", "", 200)
61-
check("no-token /docs", "GET", "/docs", "", 200)
57+
check("no-token /v1/head", "GET", "/v1/head", "", 401)
58+
check("wrong-token /v1/head", "GET", "/v1/head", "Bearer nope", 401)
59+
check("right-token /v1/head", "GET", "/v1/head", "Bearer secret", 204)
60+
check("no-token /openapi.json", "GET", "/openapi.json", "", 200)
61+
check("no-token /docs", "GET", "/docs", "", 200)
6262
}

0 commit comments

Comments
 (0)