Fix error in model.go
This commit is contained in:
parent
3e15e4159a
commit
8b7ed3414d
8
model.go
8
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue