Skip to content

Commit

Permalink
Fix revive lint
Browse files Browse the repository at this point in the history
  • Loading branch information
voltgizerz committed Jul 13, 2024
1 parent c71453d commit 620ffa3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ func handlePanic() {
}
}

func startAPIServer(interactor interactor.APInteractor, jwtMiddleware middleware.JWTAuth) {
httpServer := api.NewServer(interactor, jwtMiddleware)
func startAPIServer(i interactor.APInteractor, jwtMiddleware middleware.JWTAuth) {
httpServer := api.NewServer(i, jwtMiddleware)
httpServer.Initialize()
}

Expand Down
1 change: 0 additions & 1 deletion config/linter/revive.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ confidence = 0.8
errorCode = 1
warningCode = 0

[rule.blank-imports]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
Expand Down
2 changes: 1 addition & 1 deletion internal/adapters/api/middleware/jwt_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (m *JWTAuth) AuthorizeAccess() fiber.Handler {
}

// Function to parse Authorization header
func parseAuthHeader(authHeader string) (string, string, error) {
func parseAuthHeader(authHeader string) (tokenType string, tokenValue string, err error) {
if authHeader == "" {
return "", "", errors.New("authorization header is empty")
}
Expand Down
4 changes: 2 additions & 2 deletions internal/adapters/repository/user_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ func (r *UserRepository) RegisterUser(ctx context.Context, tx *sql.Tx, userData
return 0, err
}

lastId, err := result.LastInsertId()
lastID, err := result.LastInsertId()
if err != nil {
return 0, err
}

return lastId, nil
return lastID, nil
}

func (r *UserRepository) GetUserByEmail(ctx context.Context, email string) (*models.UserORM, error) {
Expand Down
1 change: 0 additions & 1 deletion internal/core/service/auth_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,4 @@ func (s *AuthService) Register(ctx context.Context, userData entity.User) (int64
}

return result, nil

}

0 comments on commit 620ffa3

Please sign in to comment.