func handleIP(v []string) (interface{}, error) {
	IP, _, err := net.ParseCIDR(strings.Join(v, ""))
	if err != nil {
		IP = net.ParseIP(v[0])
	}
	if IP == nil {
		return nil, fmt.Errorf("not a valid IP address: %v", v[0])
	}
	return IP, nil
}
handleIP parses an IPv4 or IPv6 address
package net
import (
	"fmt"
	"net"
	"strings"
	"zgo.at/sconfig"
)
func init() {
	sconfig.RegisterType("net.IP", sconfig.ValidateSingleValue(), handleIP)
	sconfig.RegisterType("[]net.IP", sconfig.ValidateValueLimit(1, 0), handleIPSlice)
}