Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
fix linter
Antonio Ojeaf86fe7e5cc3b
diff --git a/cmd/sam/mesh_get_agents.go b/cmd/sam/mesh_get_agents.goindex c8d1044e..4479ee3d 100644--- a/cmd/sam/mesh_get_agents.go+++ b/cmd/sam/mesh_get_agents.go@@ -20,6 +20,7 @@ import ("encoding/json""fmt""io"+ "log/slog""net/http""net/http/httptest""os"@@ -121,7 +122,11 @@ func runMeshGetAgentsWatch(parent context.Context, cfg *runConfig, format outputif err != nil {return fmt.Errorf("creating inventory watch manager: %w", err)}- defer watchManager.Close()+ defer func() {+ if closeErr := watchManager.Close(); closeErr != nil {+ slog.Warn("closing inventory watch manager", "err", closeErr)+ }+ }()server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {if r.URL.Path != "/.sam/watch/inventory" {diff --git a/cmd/sam/proxy.go b/cmd/sam/proxy.goindex f8b7c992..d90688d1 100644--- a/cmd/sam/proxy.go+++ b/cmd/sam/proxy.go@@ -94,7 +94,11 @@ func runProxy(parent context.Context, cfg *runConfig) error {if err != nil {return fmt.Errorf("creating inventory watch manager: %w", err)}- defer watchManager.Close()+ defer func() {+ if closeErr := watchManager.Close(); closeErr != nil {+ slog.Warn("closing inventory watch manager", "err", closeErr)+ }+ }()handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {if strings.HasPrefix(r.URL.Path, "/.sam/") {