code: func PortFromString(pt string) (*Port, error) {
  	var port Port
  
  	pt = "name=" + pt
  	ptQuery, err := common.MakeQueryString(pt)
  	if err != nil {
  		return nil, err
  	}
  
  	v, err := url.ParseQuery(ptQuery)
  	if err != nil {
  		return nil, err
  	}
  	for key, val := range v {
  		if len(val) > 1 {
  			return nil, fmt.Errorf("label %s with multiple values %q", key, val)
  		}
  
  		switch key {
  		case "name":
  			acn, err := NewACName(val[0])
  			if err != nil {
  				return nil, err
  			}
  			port.Name = *acn
  		case "protocol":
  			port.Protocol = val[0]
  		case "port":
  			p, err := strconv.ParseUint(val[0], 10, 16)
  			if err != nil {
  				return nil, err
  			}
  			port.Port = uint(p)
  		case "count":
  			cnt, err := strconv.ParseUint(val[0], 10, 16)
  			if err != nil {
  				return nil, err
  			}
  			port.Count = uint(cnt)
  		case "socketActivated":
  			sa, err := strconv.ParseBool(val[0])
  			if err != nil {
  				return nil, err
  			}
  			port.SocketActivated = sa
  		default:
  			return nil, fmt.Errorf("unknown port parameter %q", key)
  		}
  	}
  	err = port.assertValid()
  	if err != nil {
  		return nil, err
  	}
  
  	return &port, nil
  }
docs: // PortFromString takes a command line port parameter and returns a port
  //
  // It is useful for actool patch-manifest --ports
  //
  // Example port parameters:
  //      health-check,protocol=udp,port=8000
  // 	query,protocol=tcp,port=8080,count=1,socketActivated=true