Implement review suggestions

This commit is contained in:
Daniel 2021-01-06 13:34:25 +01:00
parent 5daeac8cf7
commit 3244fefd43
10 changed files with 118 additions and 111 deletions

View file

@ -1,7 +1,6 @@
package api
import (
"context"
"errors"
"fmt"
"net/http"
@ -14,7 +13,7 @@ var (
testToken = new(AuthToken)
)
func testAuthenticator(ctx context.Context, s *http.Server, r *http.Request) (*AuthToken, error) {
func testAuthenticator(r *http.Request, s *http.Server) (*AuthToken, error) {
switch {
case testToken.Read == -127 || testToken.Write == -127:
return nil, errors.New("test error")