Files
herolib/lib/develop/luadns/utils.v
Mahmoud Emad 4c01c88b85 WIP: Building hero
- The work is still in progress

Co-authored-by: supermario <mariobassem12@gmail.com>
2025-01-02 19:01:37 +02:00

21 lines
295 B
V

module luadns
fn is_valid_ip(ip string) bool {
parts := ip.split('.')
if parts.len != 4 {
return false
}
for part in parts {
num := part.int()
if num < 0 || num > 255 {
return false
}
}
return true
}
fn is_valid_domain(domain string) bool {
// TODO: implement
return true
}