Skip to content

Agent Mesh

fix lint:

Antonio Ojead2c117a99b3c
diff --git a/cmd/sam-node/hub_config.go b/cmd/sam-node/hub_config.go
index 33dc8a2a..260ee6ba 100644
--- a/cmd/sam-node/hub_config.go
+++ b/cmd/sam-node/hub_config.go
@@ -47,7 +47,7 @@ func FetchHubInfo(ctx context.Context, hubURL string) (*api.HubInfoResponse, err
if err != nil {
return nil, fmt.Errorf("HTTP request failed: %w", err)
}
- defer resp.Body.Close()
+ defer resp.Body.Close() //nolint:errcheck
body, err := io.ReadAll(io.LimitReader(resp.Body, 1024*1024))
if err != nil {
diff --git a/cmd/sam-node/hub_config_test.go b/cmd/sam-node/hub_config_test.go
index 6065d298..69315f06 100644
--- a/cmd/sam-node/hub_config_test.go
+++ b/cmd/sam-node/hub_config_test.go
@@ -117,7 +117,7 @@ func TestSyncHubConfig(t *testing.T) {
if err != nil {
t.Fatalf("Failed to create store: %v", err)
}
- defer store.Close()
+ defer store.Close() //nolint:errcheck
// Initial store is empty, so SyncHubConfig should just return empty
pubKey, addrs, err := SyncHubConfig(context.Background(), store)