Documentation ¶
Index ¶
Constants ¶
View Source
const IsDifficultyEnumValidator = "isdifficultyenum"
Variables ¶
View Source
var IsDifficultyEnum validator.Func = func(fl validator.FieldLevel) bool { field := fl.Field() if field.Kind() == reflect.String { v := field.String() switch v { case string(game.BeginnerDifficulty): fallthrough case string(game.IntermediateDifficulty): fallthrough case string(game.ExpertDifficulty): return true default: return false } } return false }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.