ocket8888 commented on a change in pull request #5922:
URL: https://github.com/apache/trafficcontrol/pull/5922#discussion_r651790889



##########
File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
##########
@@ -110,6 +110,42 @@ func (ds *TODeliveryService) IsTenantAuthorized(user 
*auth.CurrentUser) (bool, e
        return isTenantAuthorized(ds.ReqInfo, &ds.DeliveryServiceV4)
 }
 
+const getTLSVersionsQuery = `
+SELECT tls_version
+FROM public.deliveryservice_tls_version
+WHERE deliveryservice = $1
+ORDER BY tls_version
+`
+
+// GetDSTLSVersions retrieves the TLS versions explicitly supported by a
+// Delivery Service identified by dsID. This will panic if handed a nil

Review comment:
       I don't know that's obvious without reading the function. It might be 
obvious to you, being familiar with how the TO codebase most often has 
functions that panic when given nil transactions, but that doesn't mean it's 
obvious to everyone. You could reasonably think that it would return an error 
instead of crashing the whole thread it's running on.
   
   I don't think it hurts anything to make it clear in the GoDoc.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to