mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-24 09:20:59 +00:00
lint
This commit is contained in:
parent
cc7a35ee92
commit
5d5327614d
3 changed files with 19 additions and 17 deletions
|
@ -24,20 +24,20 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
users = "users"
|
users = "users"
|
||||||
actors = "actors"
|
actors = "actors"
|
||||||
statuses = "statuses"
|
statuses = "statuses"
|
||||||
inbox = "inbox"
|
inbox = "inbox"
|
||||||
outbox = "outbox"
|
outbox = "outbox"
|
||||||
followers = "followers"
|
followers = "followers"
|
||||||
following = "following"
|
following = "following"
|
||||||
liked = "liked"
|
liked = "liked"
|
||||||
collections = "collections"
|
// collections = "collections"
|
||||||
featured = "featured"
|
// featured = "featured"
|
||||||
publicKey = "main-key"
|
publicKey = "main-key"
|
||||||
follow = "follow"
|
follow = "follow"
|
||||||
update = "updates"
|
// update = "updates"
|
||||||
blocks = "blocks"
|
blocks = "blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -38,8 +38,8 @@ const (
|
||||||
maximumDescriptionLength = 5000
|
maximumDescriptionLength = 5000
|
||||||
maximumSiteTermsLength = 5000
|
maximumSiteTermsLength = 5000
|
||||||
maximumUsernameLength = 64
|
maximumUsernameLength = 64
|
||||||
maximumEmojiShortcodeLength = 30
|
// maximumEmojiShortcodeLength = 30
|
||||||
maximumHashtagLength = 30
|
// maximumHashtagLength = 30
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewPassword returns an error if the given password is not sufficiently strong, or nil if it's ok.
|
// NewPassword returns an error if the given password is not sufficiently strong, or nil if it's ok.
|
||||||
|
|
|
@ -46,7 +46,9 @@ func ulidValidator(fl validator.FieldLevel) bool {
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
v = validator.New()
|
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.
|
// Struct validates the passed struct, returning validator.ValidationErrors if invalid, or nil if OK.
|
||||||
|
|
Loading…
Reference in a new issue