Skip to content

Commit

Permalink
fix: calm down linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrynenko committed Dec 12, 2024
1 parent be7e39a commit 8b788c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions internal/service/requests/user_id_hash_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
val "github.com/go-ozzo/ozzo-validation/v4"
)

func GetPathUserIDHash(r *http.Request) (userIdHash string, err error) {
userIdHash = chi.URLParam(r, "user_id_hash")
func GetPathUserIDHash(r *http.Request) (userIDHash string, err error) {
userIDHash = chi.URLParam(r, "user_id_hash")

err = val.Errors{
"user_id": val.Validate(userIdHash, val.Required),
"user_id": val.Validate(userIDHash, val.Required),
}.Filter()
return
}
6 changes: 3 additions & 3 deletions internal/service/requests/user_id_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
val "github.com/go-ozzo/ozzo-validation/v4"
)

func GetPathUserID(r *http.Request) (userId string, err error) {
userId = strings.ToLower(chi.URLParam(r, "user_id"))
func GetPathUserID(r *http.Request) (userID string, err error) {
userID = strings.ToLower(chi.URLParam(r, "user_id"))

err = val.Errors{
"user_id": val.Validate(userId, val.Required),
"user_id": val.Validate(userID, val.Required),
}.Filter()
return
}

0 comments on commit 8b788c8

Please sign in to comment.