Files
console/param/helper.go
andrey e80e292830
All checks were successful
Go Action / goaction (pull_request) Successful in 45s
move command to folder
2026-01-05 23:23:20 +03:00

24 lines
321 B
Go

package param
func Bool(in Params, key any) (bool, bool) {
data, ok := in.Param(key)
if !ok {
return false, false
}
res, ok := data.(bool)
return res, ok
}
func String(in Params, key any) (string, bool) {
data, ok := in.Param(key)
if !ok {
return "", false
}
res, ok := data.(string)
return res, ok
}