code: func LookupServicePortNumberByName(svc v1.Service, name string) (int32, error) {
  	for _, svcportspec := range svc.Spec.Ports {
  		if svcportspec.Name == name {
  			return svcportspec.Port, nil
  		}
  	}
  
  	return int32(-1), fmt.Errorf("Service '%s' does not have a named port '%s'", svc.Name, name)
  }
docs: // LookupServicePortNumberByName find service port number by its named port name