added some missing defer close()
This commit is contained in:
parent
3e218a8172
commit
e0ace15709
2 changed files with 2 additions and 1 deletions
2
main.go
2
main.go
|
@ -541,6 +541,7 @@ func (web *Web) watchCreatePost(c *gin.Context) {
|
|||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
return
|
||||
}
|
||||
defer openedFile.Close()
|
||||
jsn, _ = ioutil.ReadAll(openedFile)
|
||||
} else { // selected one of the templates
|
||||
templateFiles, err := EMBED_FS.ReadDir("watchTemplates")
|
||||
|
@ -1207,6 +1208,7 @@ func (web *Web) importWatch(c *gin.Context) {
|
|||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
return
|
||||
}
|
||||
defer openedFile.Close()
|
||||
jsn, _ := ioutil.ReadAll(openedFile)
|
||||
|
||||
export := WatchExport{}
|
||||
|
|
1
todo.md
1
todo.md
|
@ -13,4 +13,3 @@
|
|||
- ~~restore from upload~~
|
||||
- browserless function filters
|
||||
- url path support
|
||||
- defer formfile.close()
|
Loading…
Add table
Reference in a new issue