mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 21:42:25 -05:00
change muchos things
This commit is contained in:
parent
fffff93b75
commit
2786b5f887
70 changed files with 999 additions and 570 deletions
|
|
@ -27,6 +27,7 @@ import (
|
|||
|
||||
var v *validator.Validate
|
||||
|
||||
// Validation Panic messages
|
||||
const (
|
||||
PointerValidationPanic = "validate function was passed pointer"
|
||||
InvalidValidationPanic = "validate function was passed invalid item"
|
||||
|
|
@ -48,6 +49,7 @@ func init() {
|
|||
v.RegisterValidation("ulid", ulidValidator)
|
||||
}
|
||||
|
||||
// ValidateStruct validates the passed struct, returning validator.ValidationErrors if invalid, or nil if OK.
|
||||
func ValidateStruct(s interface{}) error {
|
||||
switch reflect.ValueOf(s).Kind() {
|
||||
case reflect.Invalid:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue