[PR #6] Fix staticcheck issues #18

Open
opened 2026-03-01 14:36:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amitshekhariitbhu/go-backend-clean-architecture/pull/6
Author: @timoa
Created: 1/15/2023
Status: 🔄 Open

Base: mainHead: fix/staticcheck-issues


📝 Commits (1)

  • 71dfb2d fix(lint): fix staticcheck issues

📊 Changes

3 files changed (+15 additions, -36 deletions)

View changed files

📝 domain/jwt_custom.go (+2 -2)
📝 internal/tokenutil/tokenutil.go (+13 -8)
📝 mongo/mongo.go (+0 -26)

📄 Description

Hi!

After running staticcheck on the project, it funds a few errors:

Deprecated

internal/tokenutil/tokenutil.go:16:19: jwt.StandardClaims is deprecated: Use RegisteredClaims instead for a forward-compatible way to access registered claims in a struct. (SA1019)
internal/tokenutil/tokenutil.go:31:19: jwt.StandardClaims is deprecated: Use RegisteredClaims instead for a forward-compatible way to access registered claims in a struct. (SA1019)

Unused

mongo/mongo.go:76:6: type nullawareDecoder is unused (U1000)
mongo/mongo.go:81:28: func (*nullawareDecoder).DecodeValue is unused (U1000)

Formatting

internal/tokenutil/tokenutil.go:46:16: error strings should not be capitalized (ST1005)
internal/tokenutil/tokenutil.go:59:16: error strings should not be capitalized (ST1005)
internal/tokenutil/tokenutil.go:71:14: error strings should not be capitalized (ST1005)

This PR will fix them, hopefully :)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amitshekhariitbhu/go-backend-clean-architecture/pull/6 **Author:** [@timoa](https://github.com/timoa) **Created:** 1/15/2023 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/staticcheck-issues` --- ### 📝 Commits (1) - [`71dfb2d`](https://github.com/amitshekhariitbhu/go-backend-clean-architecture/commit/71dfb2d3f741eee468377cea50918c3ca81de74d) fix(lint): fix staticcheck issues ### 📊 Changes **3 files changed** (+15 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `domain/jwt_custom.go` (+2 -2) 📝 `internal/tokenutil/tokenutil.go` (+13 -8) 📝 `mongo/mongo.go` (+0 -26) </details> ### 📄 Description Hi! After running staticcheck on the project, it funds a few errors: **Deprecated** > internal/tokenutil/tokenutil.go:16:19: jwt.StandardClaims is deprecated: Use RegisteredClaims instead for a forward-compatible way to access registered claims in a struct. (SA1019) > internal/tokenutil/tokenutil.go:31:19: jwt.StandardClaims is deprecated: Use RegisteredClaims instead for a forward-compatible way to access registered claims in a struct. (SA1019) **Unused** > mongo/mongo.go:76:6: type nullawareDecoder is unused (U1000) > mongo/mongo.go:81:28: func (*nullawareDecoder).DecodeValue is unused (U1000) **Formatting** > internal/tokenutil/tokenutil.go:46:16: error strings should not be capitalized (ST1005) > internal/tokenutil/tokenutil.go:59:16: error strings should not be capitalized (ST1005) > internal/tokenutil/tokenutil.go:71:14: error strings should not be capitalized (ST1005) This PR will fix them, hopefully :) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-backend-clean-architecture#18
No description provided.