You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/04/28 20:12:51 UTC

[GitHub] [trafficcontrol] alebricio opened a new pull request #5795: Fix `go vet`: Struct field tag issues

alebricio opened a new pull request #5795:
URL: https://github.com/apache/trafficcontrol/pull/5795


   ## What does this PR (Pull Request) do?
   - [x] This PR fixes #5763
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Ops
   - Traffic Monitor
   - Traffic Router tester (Go)
   
   ## What is the best way to verify this PR?
   `go vet -structtag ./...` should find 0 issues.
   
   ## The following criteria are ALL met by this PR
   - [x] This PR includes tests OR I have explained why tests are unnecessary
   - [x] This PR includes documentation OR I have explained why documentation is unnecessary
   - [x] This PR includes an update to CHANGELOG.md OR such an update is not necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)


-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] alebricio commented on a change in pull request #5795: Fix `go vet`: Struct field tag issues

Posted by GitBox <gi...@apache.org>.
alebricio commented on a change in pull request #5795:
URL: https://github.com/apache/trafficcontrol/pull/5795#discussion_r622564102



##########
File path: traffic_monitor/health/event.go
##########
@@ -42,8 +42,8 @@ type Event struct {
 	Hostname      string `json:"hostname"`
 	Type          string `json:"type"`
 	Available     bool   `json:"isAvailable"`
-	IPv4Available bool   `json:"isAvailable"`
-	IPv6Available bool   `json:"isAvailable"`
+	IPv4Available bool   `json:"isIPv4Available"`

Review comment:
       Made changes ~ Thank you for your review! 




-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5795: Fix `go vet`: Struct field tag issues

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5795:
URL: https://github.com/apache/trafficcontrol/pull/5795#discussion_r622525860



##########
File path: traffic_monitor/health/event.go
##########
@@ -42,8 +42,8 @@ type Event struct {
 	Hostname      string `json:"hostname"`
 	Type          string `json:"type"`
 	Available     bool   `json:"isAvailable"`
-	IPv4Available bool   `json:"isAvailable"`
-	IPv6Available bool   `json:"isAvailable"`
+	IPv4Available bool   `json:"isIPv4Available"`

Review comment:
       This should be `ipv4Available` to match the JSON for `tc.IsAvailable.Ipv4Available`:
   https://github.com/apache/trafficcontrol/blob/730d842d07d736c344adad9f5081ec30e6790ea9/lib/go-tc/crstates.go#L41

##########
File path: traffic_monitor/health/event.go
##########
@@ -42,8 +42,8 @@ type Event struct {
 	Hostname      string `json:"hostname"`
 	Type          string `json:"type"`
 	Available     bool   `json:"isAvailable"`
-	IPv4Available bool   `json:"isAvailable"`
-	IPv6Available bool   `json:"isAvailable"`
+	IPv4Available bool   `json:"isIPv4Available"`
+	IPv6Available bool   `json:"isIPv6Available"`

Review comment:
       This should be `ipv6Available` to match the JSON for `tc.IsAvailable.Ipv6Available`:
   https://github.com/apache/trafficcontrol/blob/730d842d07d736c344adad9f5081ec30e6790ea9/lib/go-tc/crstates.go#L42




-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman merged pull request #5795: Fix `go vet`: Struct field tag issues

Posted by GitBox <gi...@apache.org>.
zrhoffman merged pull request #5795:
URL: https://github.com/apache/trafficcontrol/pull/5795


   


-- 
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:
users@infra.apache.org