func NormalizedIP(ip string) string {
	if net.ParseIP(ip) != nil {
		return ip
	}
	return ""
}
If IP is valid, return itself otherwise empty string
package utils
import "net"
func StringToIPNet(in string) *net.IPNet {
	ip, cidr, _ := net.ParseCIDR(in)
	cidr.IP = ip
	return cidr
}