fixed two ineffassign warnings
This commit is contained in:
parent
f8c6d7fc4d
commit
af35dd44c9
2 changed files with 5 additions and 1 deletions
2
main.go
2
main.go
|
@ -267,7 +267,7 @@ func (server Server) streamRecordings(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
momentsJSON, _ := json.Marshal(moments)
|
||||
err = momentsTemplate.Execute(w, struct {
|
||||
momentsTemplate.Execute(w, struct {
|
||||
Streams map[string]*Stream
|
||||
MomentsJSON string
|
||||
Moments [][]string
|
||||
|
|
|
@ -64,6 +64,10 @@ func (s *Stream) Update() {
|
|||
}
|
||||
s.Timeouts = 0
|
||||
img, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// Get the image from the response and write it to disk in a goroutine
|
||||
|
|
Loading…
Add table
Reference in a new issue