From 8b7ed3414d9e596d2e13b4150e92d3859094e0c1 Mon Sep 17 00:00:00 2001 From: Tyler Date: Sat, 13 Apr 2019 16:50:35 -0400 Subject: [PATCH] Fix error in model.go --- model.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/model.go b/model.go index b4fb9f7..af206ff 100644 --- a/model.go +++ b/model.go @@ -91,8 +91,8 @@ type VoiceProcessingData struct { io.ReadCloser Client *http.Client - URL string - File string + URL string + File string res *http.Response } @@ -105,6 +105,8 @@ func (v *VoiceProcessingData) open() error { } v.res = res + + return nil } func (v *VoiceProcessingData) Close() error { @@ -148,7 +150,7 @@ func (v *VoiceProcessingData) SaveTo(file string) error { defer v.res.Body.Close() - _, err = io.Copy(f, v.res.Body) + _, err = io.Copy(f, v.res.Body) return err }