ocket8888 commented on a change in pull request #3935: Rewrite POST servercheck
to GO
URL: https://github.com/apache/trafficcontrol/pull/3935#discussion_r328385147
##########
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:
Sure, why not, that's what tests are for, huh? Personally I think we ought
to be using `uint` or `uint64` but that's a sweeping change to the codebase.
----------------------------------------------------------------
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