linting: fixup some stuffs

This commit is contained in:
Zach Ramsay
2017-10-04 18:16:48 -04:00
parent 7921fb0c05
commit 87cb57c3e5
12 changed files with 121 additions and 22 deletions
-1
View File
@@ -6,7 +6,6 @@ Please read the README and godoc to see how to
configure the server for your application.
*/
// nolint: goimports
package server
import (
-1
View File
@@ -52,7 +52,6 @@ func (k Keys) GetKey(w http.ResponseWriter, r *http.Request) {
writeSuccess(w, &key)
}
// nolint: unparam
func (k Keys) ListKeys(w http.ResponseWriter, r *http.Request) {
keys, err := k.manager.List()
-3
View File
@@ -120,7 +120,6 @@ func listKeys(h http.Handler) (keys.Infos, int, error) {
return data, rr.Code, err
}
// nolint: unparam
func getKey(h http.Handler, name string) (*keys.Info, int, error) {
rr := httptest.NewRecorder()
req, err := http.NewRequest("GET", "/keys/"+name, nil)
@@ -138,7 +137,6 @@ func getKey(h http.Handler, name string) (*keys.Info, int, error) {
return &data, rr.Code, err
}
// nolint: unparam
func createKey(h http.Handler, name, passphrase, algo string) (*types.CreateKeyResponse, int, error) {
rr := httptest.NewRecorder()
post := types.CreateKeyRequest{
@@ -167,7 +165,6 @@ func createKey(h http.Handler, name, passphrase, algo string) (*types.CreateKeyR
return data, rr.Code, err
}
// nolint: unparam
func deleteKey(h http.Handler, name, passphrase string) (*types.ErrorResponse, int, error) {
rr := httptest.NewRecorder()
post := types.DeleteKeyRequest{