Skip to content

Commit e951cc7

Browse files
committed
fix: resolve lint errors from CI
- Check error return from os.RemoveAll in e2e TestMain - Check error return from c.Close in NewClientWithDialer - Run gofumpt formatting
1 parent c4292fa commit e951cc7

5 files changed

Lines changed: 5 additions & 6 deletions

File tree

cmd/iwdp-cli/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,9 @@ func cmdNetwork(ctx context.Context, args []string) {
451451

452452
client.OnEvent("Network.loadingFailed", func(method string, params json.RawMessage) {
453453
var evt struct {
454-
RequestID string `json:"requestId"`
455-
ErrorText string `json:"errorText"`
456-
Canceled bool `json:"canceled"`
454+
RequestID string `json:"requestId"`
455+
ErrorText string `json:"errorText"`
456+
Canceled bool `json:"canceled"`
457457
}
458458
if err := json.Unmarshal(params, &evt); err != nil {
459459
return

e2e/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func trackTempDir(dir string) {
1515
func TestMain(m *testing.M) {
1616
code := m.Run()
1717
for _, dir := range tempDirs {
18-
os.RemoveAll(dir)
18+
_ = os.RemoveAll(dir)
1919
}
2020
os.Exit(code)
2121
}

internal/tools/tools_simulator_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ func TestSim_GetMatchedStyles(t *testing.T) {
355355
}
356356
}
357357

358-
359358
func TestSim_ForcePseudoState(t *testing.T) {
360359
client := getSimClient(t)
361360
ctx, cancel := simCtx()

internal/webkit/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func NewClientWithDialer(ctx context.Context, wsURL string, dialer *websocket.Di
6969
case <-time.After(100 * time.Millisecond):
7070
// No Target event — use direct mode (e.g., mock servers in tests)
7171
case <-ctx.Done():
72-
c.Close()
72+
_ = c.Close()
7373
return nil, ctx.Err()
7474
}
7575

iwdp-mcp

11.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)