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:
@@ -111,7 +111,7 @@ func TestSubmitArgo(t *testing.T) {
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(map[string]any{
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{
|
||||
"metadata": map[string]any{"name": "document-ingestion-abc123"},
|
||||
})
|
||||
}))
|
||||
@@ -132,7 +132,7 @@ func TestSubmitArgo(t *testing.T) {
|
||||
func TestSubmitArgoError(t *testing.T) {
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
w.Write([]byte(`{"message":"bad request"}`))
|
||||
_, _ = w.Write([]byte(`{"message":"bad request"}`))
|
||||
}))
|
||||
defer ts.Close()
|
||||
|
||||
@@ -153,7 +153,7 @@ func TestSubmitKubeflow(t *testing.T) {
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(map[string]any{
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{
|
||||
"run": map[string]any{"id": "kf-run-456"},
|
||||
})
|
||||
}))
|
||||
@@ -174,7 +174,7 @@ func TestSubmitKubeflow(t *testing.T) {
|
||||
func TestSubmitKubeflowError(t *testing.T) {
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
w.Write([]byte("internal error"))
|
||||
_, _ = w.Write([]byte("internal error"))
|
||||
}))
|
||||
defer ts.Close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user