Skip to content

Commit c3d7be0

Browse files
jensneuseclaude
andcommitted
chore: satisfy gci and modernize linters
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1d04486 commit c3d7be0

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

v2/pkg/engine/datasource/httpclient/nethttpclient.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,7 @@ func makeHTTPRequest(client *http.Client, ctx context.Context, baseHeaders http.
259259
// the compressed size, so this remains a safe lower-bound hint.
260260
if cl := response.ContentLength; cl > 0 {
261261
const maxPreAlloc = 1 << 21 // 2 MiB
262-
want := int(cl)
263-
if want > maxPreAlloc {
264-
want = maxPreAlloc
265-
}
262+
want := min(int(cl), maxPreAlloc)
266263
if want > out.Cap() {
267264
out.Grow(want)
268265
}

v2/pkg/engine/resolve/loader.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -795,12 +795,7 @@ func fetchTreeHasNestedParallel(node *FetchTreeNode) bool {
795795
}
796796
}
797797
}
798-
for _, child := range node.ChildNodes {
799-
if fetchTreeHasNestedParallel(child) {
800-
return true
801-
}
802-
}
803-
return false
798+
return slices.ContainsFunc(node.ChildNodes, fetchTreeHasNestedParallel)
804799
}
805800

806801
func (l *Loader) callOnFinished(res *result) {

v2/pkg/engine/resolve/loader_dataflow.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import (
77
"slices"
88

99
"github.com/pkg/errors"
10+
1011
"github.com/wundergraph/astjson"
12+
1113
"github.com/wundergraph/graphql-go-tools/v2/pkg/ast"
1214
)
1315

0 commit comments

Comments
 (0)