func ConvertStandard(network string) Type {
	network = strings.ToLower(network)
	switch network {
	case "tcp":
		return TypeTCP
	case "tcp4":
		return TypeTCP4
	case "tcp6":
		return TypeTCP6
	case "udp":
		return TypeUDP
	case "udp4":
		return TypeUDP4
	case "udp6":
		return TypeUDP6
	case "ip":
		return TypeIP
	case "ip4":
		return TypeIP4
	case "ip6":
		return TypeIP6
	case "unix":
		return TypeUnix
	case "unixgram":
		return TypeUnixGram
	case "unixpacket":
		return TypeUnixPacket
	}
	return TypeInvalid
}
ConvertStandard library network value from string to Type.
It will return TypeInvalid (0) if network is unknown.
package net
import (
	"errors"
	"net"
	"strings"
)
const (
	maxPort = (1 << 16) - 1
)
var (
	ErrHostAddress = errors.New("invalid host address")
)
type Type uint16
const (
	TypeInvalid Type = 0
	TypeTCP     Type = 1 << iota
	TypeTCP4
	TypeTCP6
	TypeUDP
	TypeUDP4
	TypeUDP6
	TypeIP
	TypeIP4
	TypeIP6
	TypeUnix
	TypeUnixGram
	TypeUnixPacket
)