Skip to content

Commit

Permalink
chore(fvt): fix proxy.go syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
  • Loading branch information
dnwe authored Aug 11, 2023
1 parent afdce48 commit cbabf8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/toxiproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (p *Proxy) Save() (*Proxy, error) {
defer resp.Body.Close()

if resp.StatusCode == 404 {
if err := body.Seek(0, io.SeekStart); err != nil {
if _, err := body.Seek(0, io.SeekStart); err != nil {
return nil, fmt.Errorf("failed to rewind post body: %w", err)
}
req, err = http.NewRequest("POST", c.endpoint+"/proxies", body)
Expand Down

0 comments on commit cbabf8c

Please sign in to comment.