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



##########
File path: traffic_ops/traffic_ops_golang/tenant/tenancy.go
##########
@@ -227,3 +227,32 @@ func getDSTenantIDByIDTx(tx *sql.Tx, id int) (*int, bool, 
error) {
        }
        return tenantID, true, nil
 }
+
+// GetServiceCategoryTenantIDByNameTx returns the tenant ID, whether the 
service category exists, and any error.
+func GetServiceCategoryTenantIDByNameTx(tx *sql.Tx, name string) (*int, bool, 
error) {

Review comment:
       it's not possible for a service category to have no tenant ID, so you 
can't ever see `nil, true, nil` returned from this function. Since when the 
other two values are `false` and/or some non-`nil` error, it seems like there's 
no reason to allow this to return a nil ID. Why not just have this return `int, 
bool, error`?




----------------------------------------------------------------
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