Fix broken test due to linter fix

This commit is contained in:
max furman 2022-02-03 12:43:53 -08:00
parent 62690ab52e
commit 5f4ac5beff
2 changed files with 2 additions and 2 deletions

View file

@ -142,7 +142,7 @@ func (e *Error) UnmarshalJSON(data []byte) error {
return err return err
} }
e.Status = er.Status e.Status = er.Status
e.Err = errors.New(er.Message) e.Err = fmt.Errorf("%s", er.Message)
return nil return nil
} }

View file

@ -58,7 +58,7 @@ func TestError_UnmarshalJSON(t *testing.T) {
t.Errorf("Error.UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) t.Errorf("Error.UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
} }
if !reflect.DeepEqual(tt.expected, e) { if !reflect.DeepEqual(tt.expected, e) {
t.Errorf("Error.UnmarshalJSON() wants = %v, got %v", tt.expected, e) t.Errorf("Error.UnmarshalJSON() wants = %+v, got %+v", tt.expected, e)
} }
}) })
} }