You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/09/04 19:58:15 UTC

[GitHub] moltzaum commented on a change in pull request #2783: Fix Go struct versioning, remove duplicate code, use embedding, reconcile differences

moltzaum commented on a change in pull request #2783: Fix Go struct versioning, remove duplicate code, use embedding, reconcile differences
URL: https://github.com/apache/trafficcontrol/pull/2783#discussion_r215047134
 
 

 ##########
 File path: traffic_ops/client/deliveryservice.go
 ##########
 @@ -56,25 +56,37 @@ func (to *Session) GetDeliveryServicesByServer(id int) ([]tc.DeliveryService, Re
 	return data.Response, reqInf, nil
 }
 
+func (to *Session) GetDeliveryServiceByXMLID(XMLID string) ([]tc.DeliveryService, ReqInf, error) {
+	var data tc.GetDeliveryServiceResponse
+	reqInf, err := get(to, deliveryServicesByXMLID(XMLID), &data)
+	if err != nil {
+		return nil, reqInf, err
+	}
+
+	return data.Response, reqInf, nil
+}
+
 // DeliveryService gets the DeliveryService for the ID it's passed
 // Deprecated: use GetDeliveryService
-func (to *Session) DeliveryService(id string) (*tc.DeliveryService, error) {
+func (to *Session) DeliveryService(id string) (*tc.DeliveryServiceV13, error) {
 
 Review comment:
   Isn't this supposed to be just `DeliveryService`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services