diff options
| -rw-r--r-- | internal/regexes/regexes.go | 28 | ||||
| -rw-r--r-- | internal/validate/formvalidation.go | 4 | ||||
| -rw-r--r-- | internal/validate/structvalidation.go | 4 | 
3 files changed, 19 insertions, 17 deletions
diff --git a/internal/regexes/regexes.go b/internal/regexes/regexes.go index 53446ff2c..8ac31ef62 100644 --- a/internal/regexes/regexes.go +++ b/internal/regexes/regexes.go @@ -24,20 +24,20 @@ import (  )  const ( -	users       = "users" -	actors      = "actors" -	statuses    = "statuses" -	inbox       = "inbox" -	outbox      = "outbox" -	followers   = "followers" -	following   = "following" -	liked       = "liked" -	collections = "collections" -	featured    = "featured" -	publicKey   = "main-key" -	follow      = "follow" -	update      = "updates" -	blocks      = "blocks" +	users     = "users" +	actors    = "actors" +	statuses  = "statuses" +	inbox     = "inbox" +	outbox    = "outbox" +	followers = "followers" +	following = "following" +	liked     = "liked" +	// collections = "collections" +	// featured    = "featured" +	publicKey = "main-key" +	follow    = "follow" +	// update      = "updates" +	blocks = "blocks"  )  const ( diff --git a/internal/validate/formvalidation.go b/internal/validate/formvalidation.go index a30ec1a58..9f61578e7 100644 --- a/internal/validate/formvalidation.go +++ b/internal/validate/formvalidation.go @@ -38,8 +38,8 @@ const (  	maximumDescriptionLength      = 5000  	maximumSiteTermsLength        = 5000  	maximumUsernameLength         = 64 -	maximumEmojiShortcodeLength   = 30 -	maximumHashtagLength          = 30 +	// maximumEmojiShortcodeLength   = 30 +	// maximumHashtagLength          = 30  )  // NewPassword returns an error if the given password is not sufficiently strong, or nil if it's ok. diff --git a/internal/validate/structvalidation.go b/internal/validate/structvalidation.go index 7717822d9..3c7a4abd9 100644 --- a/internal/validate/structvalidation.go +++ b/internal/validate/structvalidation.go @@ -46,7 +46,9 @@ func ulidValidator(fl validator.FieldLevel) bool {  func init() {  	v = validator.New() -	v.RegisterValidation("ulid", ulidValidator) +	if err := v.RegisterValidation("ulid", ulidValidator); err != nil { +		panic(err) +	}  }  // Struct validates the passed struct, returning validator.ValidationErrors if invalid, or nil if OK.  | 
