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



##########
File path: traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go
##########
@@ -812,6 +812,14 @@ func GetCacheGroupNameFromID(tx *sql.Tx, id int) 
(tc.CacheGroupName, bool, error
        return tc.CacheGroupName(name), true, nil
 }
 
+// TopologyExistsString is a convenience function for checking if a Topology 
exists
+// when its name is an actual string instead of a 
github.com/apache/trafficcontrol/lib/go-tc.TopologyName
+func TopologyExistsString(tx *sql.Tx, name string) (bool, error) {
+       return TopologyExists(tx, tc.TopologyName(name))
+}

Review comment:
       I would prefer that too, but I didn't check the number of usages. I 
assumed it had a few more than it apparently does, and didn't want to bother 
with it. Thanks for checking that out for me.




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