otter-space-sdk/internal/utils/slices.go

12 lines
159 B
Go
Raw Normal View History

package utils
func GetOrDefault(data map[string]any, key string, defaultVal any) any {
val, ok := data[key]
if !ok {
return defaultVal
}
return val
}