code: func Parse(spec string) (Interface, error) {
  	var (
  		parts = strings.SplitN(spec, ":", 2)
  		mech  = strings.ToLower(parts[0])
  		ip    net.IP
  	)
  	if len(parts) > 1 {
  		ip = net.ParseIP(parts[1])
  		if ip == nil {
  			return nil, errors.New("invalid IP address")
  		}
  	}
  	switch mech {
  	case "", "none", "off":
  		return nil, nil
  	case "any", "auto", "on":
  		return Any(), nil
  	case "extip", "ip":
  		if ip == nil {
  			return nil, errors.New("missing IP address")
  		}
  		return ExtIP(ip), nil
  	case "upnp":
  		return UPnP(), nil
  	case "pmp", "natpmp", "nat-pmp":
  		return PMP(ip), nil
  	default:
  		return nil, fmt.Errorf("unknown mechanism %q", parts[0])
  	}
  }
docs: // Parse parses a NAT interface description.
  // The following formats are currently accepted.
  // Note that mechanism names are not case-sensitive.
  //
  //     "" or "none"         return nil
  //     "extip:77.12.33.4"   will assume the local machine is reachable on the given IP
  //     "any"                uses the first auto-detected mechanism
  //     "upnp"               uses the Universal Plug and Play protocol
  //     "pmp"                uses NAT-PMP with an auto-detected gateway address
  //     "pmp:192.168.0.1"    uses NAT-PMP with the given gateway address