initial commit

This commit is contained in:
Hafizh A. Y
2025-09-25 10:46:46 +07:00
parent c43544e5e8
commit 10506238ae
64 changed files with 3564 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
package utils
// -------------------------------------------------------------------
// FlagType
// -------------------------------------------------------------------
type FlagType string
const (
FlagIsActive FlagType = "IS_ACTIVE"
)
// -------------------------------------------------------------------
// Validators
// -------------------------------------------------------------------
func IsValidFlagType(v string) bool {
switch FlagType(v) {
case FlagIsActive:
return true
}
return false
}
// example use
/**
if !utils.IsValidFlagType(req.FlagName) {
return fiber.NewError(fiber.StatusBadRequest, "invalid flag type")
}
*/