Procházet zdrojové kódy

fmt: ST1005 https://staticcheck.io/docs/checks/#ST1005

jamesread před 3 roky
rodič
revize
21b33086ae
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      internal/httpservers/restapi.go

+ 1 - 1
internal/httpservers/restapi.go

@@ -27,7 +27,7 @@ func parseToken(cookieValue string) (*jwt.Token, error) {
 	return jwt.Parse(cookieValue, func(token *jwt.Token) (interface{}, error) {
 	return jwt.Parse(cookieValue, func(token *jwt.Token) (interface{}, error) {
 		// Don't forget to validate the alg is what you expect:
 		// Don't forget to validate the alg is what you expect:
 		if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
 		if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
-			return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"])
+			return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"])
 		}
 		}
 
 
 		// hmacSampleSecret is a []byte containing your secret, e.g. []byte("my_secret_key")
 		// hmacSampleSecret is a []byte containing your secret, e.g. []byte("my_secret_key")