2025-11-18 15:32:20 +07:00

20 lines
298 B
Go

package utils
import (
"context"
)
func ValidCoords(ctx context.Context, value float64, key string) bool {
switch key {
case VALID_LATITUDE:
if value >= -90 && value <= 90 {
return true
}
case VALID_LONGITUDE:
if value >= -180 && value <= 180 {
return true
}
}
return false
}