Run go fmt/fix

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-03-13 14:16:00 +01:00
parent 8657761293
commit d5c62a9383
44 changed files with 319 additions and 364 deletions

View File

@@ -17,6 +17,7 @@ package validator
import (
"net/url"
"regexp"
"slices"
"go.probo.inc/probo/pkg/gid"
)
@@ -182,13 +183,7 @@ func GID(entityTypes ...uint16) ValidatorFunc {
if len(entityTypes) > 0 {
parsedEntityType := gidValue.EntityType()
valid := false
for _, expected := range entityTypes {
if parsedEntityType == expected {
valid = true
break
}
}
valid := slices.Contains(entityTypes, parsedEntityType)
if !valid {
return newValidationError(ErrorCodeInvalidGID, "GID has invalid entity type")
}