Skip to content

Commit

Permalink
close http.Get call (#255)
Browse files Browse the repository at this point in the history
* Remove superfluous cast

* Close resp and handle error

Signed-off-by: Aiden Fox Ivey <[email protected]>

* Update samples/embedded_file/main.go

Co-authored-by: Thomas Tendyck <[email protected]>

---------

Signed-off-by: Aiden Fox Ivey <[email protected]>
Co-authored-by: Thomas Tendyck <[email protected]>
  • Loading branch information
Aiden Fox Ivey and thomasten authored Mar 6, 2024
1 parent 3604005 commit e418792
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions samples/embedded_file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ func main() {
panic(err)
}
fmt.Println(resp.Status)
if err := resp.Body.Close(); err != nil {
panic(err)
}
}

0 comments on commit e418792

Please sign in to comment.