format code with gofmt

This commit is contained in:
2022-07-20 18:16:39 +08:00
parent 881334cccb
commit ad388cf83b
9 changed files with 19 additions and 21 deletions

View File

@@ -2,9 +2,9 @@ package api
import ( import (
"encoding/json" "encoding/json"
"errors"
"log" "log"
"net/http" "net/http"
"errors"
) )
var ( var (

View File

@@ -105,6 +105,5 @@ func (api *API) HandleDeleteFeedback(w http.ResponseWriter, r *http.Request) {
return return
} }
api.HandleOK(w, r) api.HandleOK(w, r)
} }

View File

@@ -2,8 +2,8 @@ package api
import ( import (
"encoding/json" "encoding/json"
"net/http"
"log" "log"
"net/http"
) )
type DeleteFileRequest struct { type DeleteFileRequest struct {

View File

@@ -159,4 +159,3 @@ func (api *API) HandleDeleteTag(w http.ResponseWriter, r *http.Request) {
api.HandleOK(w, r) api.HandleOK(w, r)
} }

View File

@@ -57,7 +57,7 @@ func (database *Database) GetTags() ([]*Tag, error) {
return tags, nil return tags, nil
} }
func (database *Database) UpdateTag(tag *Tag) (error) { func (database *Database) UpdateTag(tag *Tag) error {
database.singleThreadLock.Lock() database.singleThreadLock.Lock()
defer database.singleThreadLock.Unlock() defer database.singleThreadLock.Unlock()