Fix ineffectual assignments

- Don't assign variables we don't end up using
- Added missing error check in test
This commit is contained in:
Christian Muehlhaeuser 2019-08-08 09:21:21 +00:00
parent 8a48862adc
commit 7a3f8c13a2
4 changed files with 14 additions and 11 deletions

View file

@ -609,6 +609,9 @@ func TestUploadMedia(t *testing.T) {
t.Fatalf("want %q but %q", "123", attachment.ID)
}
file, err := os.Open("testdata/logo.png")
if err != nil {
t.Fatalf("could not open file: %v", err)
}
defer file.Close()
writerAttachment, err := client.UploadMediaFromReader(context.Background(), file)
if err != nil {