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/06/09 23:22:56 UTC

[GitHub] [trafficcontrol] rob05c commented on a change in pull request #5922: Per-Delivery Service TLS versions

rob05c commented on a change in pull request #5922:
URL: https://github.com/apache/trafficcontrol/pull/5922#discussion_r648746378



##########
File path: lib/go-tc/deliveryservices.go
##########
@@ -192,18 +194,416 @@ type DeliveryServiceFieldsV31 struct {
 // DeliveryServiceV40 is a Delivery Service as it appears in version 4.0 of the
 // Traffic Ops API.
 type DeliveryServiceV40 struct {
-	DeliveryServiceFieldsV31
-	DeliveryServiceFieldsV30
-	DeliveryServiceFieldsV15
-	DeliveryServiceFieldsV14
-	DeliveryServiceFieldsV13
-	DeliveryServiceNullableFieldsV11
+	// Active dictates whether the Delivery Service is routed by Traffic Router.
+	Active bool `json:"active" db:"active"`

Review comment:
       > It's a giant pain that Go won't let you just say "if it's missing this property, throw an error". That would solve so many problems.
   
   I agree. In fact, I wrote a library to do exactly that: https://github.com/rob05c/apiver - optional things are pointers, non-pointers that are missing throw decode errors. It was rejected on the list.




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