MylesBock commented on a change in pull request #5314:
URL: https://github.com/apache/trafficcontrol/pull/5314#discussion_r527550960



##########
File path: traffic_ops/traffic_ops_golang/region/regions.go
##########
@@ -95,7 +95,11 @@ func (region *TORegion) GetType() string {
 
 func (region *TORegion) Validate() error {
        if len(region.Name) < 1 {
-               return errors.New(`Region 'name' is required.`)
+               return errors.New(`region 'name' is required`)
+       }
+       if region.DivisionName == "" || region.Division == 0 {
+               // golang style guides say error strings shouldn't be 
capitalized or end with punctuation

Review comment:
       fair enough, was just providing my rationale for changing the existing 
error message




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