fix: resolve golangci-lint errcheck warnings
- Add error checks for unchecked return values (errcheck) - Remove unused struct fields (unused) - Fix gofmt formatting issues
This commit is contained in:
4
main.go
4
main.go
@@ -151,7 +151,7 @@ func submitArgo(ctx context.Context, client *http.Client, host, namespace, templ
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("argo request: %w", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
respBody, _ := io.ReadAll(resp.Body)
|
||||
|
||||
if resp.StatusCode >= 400 {
|
||||
@@ -196,7 +196,7 @@ func submitKubeflow(ctx context.Context, client *http.Client, host, pipelineID s
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("kubeflow request: %w", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
respBody, _ := io.ReadAll(resp.Body)
|
||||
|
||||
if resp.StatusCode >= 400 {
|
||||
|
||||
Reference in New Issue
Block a user