refactor and remove unused code

This commit is contained in:
yusing
2025-02-10 09:52:53 +08:00
parent eaf191e350
commit 0a7b28caf5
15 changed files with 24 additions and 52 deletions

View File

@@ -37,7 +37,6 @@ type (
const (
EndpointVersion = "/version"
EndpointName = "/name"
EndpointCACert = "/ca-cert"
EndpointProxyHTTP = "/proxy/http"
EndpointHealth = "/health"
EndpointLogs = "/logs"

View File

@@ -24,7 +24,7 @@ func (cfg *AgentConfig) Fetch(ctx context.Context, endpoint string) ([]byte, int
return nil, 0, err
}
defer resp.Body.Close()
data, err := io.ReadAll(resp.Body)
data, _ := io.ReadAll(resp.Body)
return data, resp.StatusCode, nil
}