Fix ineffectual assignments
- Don't assign variables we don't end up using - Added missing error check in test
This commit is contained in:
parent
8a48862adc
commit
7a3f8c13a2
4 changed files with 14 additions and 11 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue