ocket8888 commented on a change in pull request #3935: Rewrite POST servercheck 
to GO
URL: https://github.com/apache/trafficcontrol/pull/3935#discussion_r328294026
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go
 ##########
 @@ -274,16 +274,16 @@ func GetCDNDomainFromName(tx *sql.Tx, cdnName 
tc.CDNName) (string, bool, error)
        return domain, true, nil
 }
 
-// ServerExists returns true if the server exists.
-func ServerExists(serverName string, tx *sql.Tx) (bool, error) {
-       id := 0
+// GetServerIDFromName gets server id from a given name
+func GetServerIDFromName(serverName string, tx *sql.Tx) (int64, bool, error) {
+       id := int64(0)
 
 Review comment:
   The type of a `tc.Server.ID` field is `int`, so this should return that to 
avoid casting when passing its output into the object.

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


With regards,
Apache Git Services

Reply via email to