fixed two ineffassign warnings

This commit is contained in:
BroodjeAap 2020-10-25 11:45:47 +01:00
parent f8c6d7fc4d
commit af35dd44c9
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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