code: func (s *IGDService) AddPortMapping(protocol nat.Protocol, internalPort, externalPort int, description string, duration time.Duration) (int, error) {
  	tpl := `<u:AddPortMapping xmlns:u="%s">
  	<NewRemoteHost></NewRemoteHost>
  	<NewExternalPort>%d</NewExternalPort>
  	<NewProtocol>%s</NewProtocol>
  	<NewInternalPort>%d</NewInternalPort>
  	<NewInternalClient>%s</NewInternalClient>
  	<NewEnabled>1</NewEnabled>
  	<NewPortMappingDescription>%s</NewPortMappingDescription>
  	<NewLeaseDuration>%d</NewLeaseDuration>
  	</u:AddPortMapping>`
  	body := fmt.Sprintf(tpl, s.URN, externalPort, protocol, internalPort, s.LocalIP, description, duration/time.Second)
  
  	response, err := soapRequest(s.URL, s.URN, "AddPortMapping", body)
  	if err != nil && duration > 0 {
  		// Try to repair error code 725 - OnlyPermanentLeasesSupported
  		envelope := &soapErrorResponse{}
  		if unmarshalErr := xml.Unmarshal(response, envelope); unmarshalErr != nil {
  			return externalPort, unmarshalErr
  		}
  		if envelope.ErrorCode == 725 {
  			return s.AddPortMapping(protocol, internalPort, externalPort, description, 0)
  		}
  	}
  
  	return externalPort, err
  }
docs: // AddPortMapping adds a port mapping to the specified IGD service.