Update staticcheck version and fix all warnings (#1381)

This commit is contained in:
Ta-Ching Chen
2019-11-05 18:09:12 +08:00
committed by GitHub
parent 93d4b88d84
commit b9a5588ca9
43 changed files with 122 additions and 219 deletions
+2 -2
View File
@@ -18,7 +18,6 @@ package storagesvc
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"os"
@@ -27,6 +26,7 @@ import (
"github.com/gorilla/mux"
_ "github.com/graymeta/stow/local"
"github.com/pkg/errors"
"go.opencensus.io/plugin/ochttp"
"go.uber.org/zap"
)
@@ -109,7 +109,7 @@ func (ss *StorageService) getIdFromRequest(r *http.Request) (string, error) {
values := r.URL.Query()
ids, ok := values["id"]
if !ok || len(ids) == 0 {
return "", errors.New("Missing `id' query param")
return "", errors.New("missing `id' query param")
}
return ids[0], nil
}