From bc00d840e845d42145954839b88f1e836cd51bfd Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 22 May 2019 12:32:36 -0600 Subject: Export types and fields necessary to build configs (for config adapters) Also flag most fields with 'omitempty' for JSON marshaling --- modules/caddyhttp/routes.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/caddyhttp/routes.go') diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go index 92aa3e8..07e0566 100644 --- a/modules/caddyhttp/routes.go +++ b/modules/caddyhttp/routes.go @@ -12,12 +12,12 @@ import ( // middlewares, and a responder for handling HTTP // requests. type ServerRoute struct { - Group string `json:"group"` - Matchers map[string]json.RawMessage `json:"match"` - Apply []json.RawMessage `json:"apply"` - Respond json.RawMessage `json:"respond"` + Group string `json:"group,omitempty"` + Matchers map[string]json.RawMessage `json:"match,omitempty"` + Apply []json.RawMessage `json:"apply,omitempty"` + Respond json.RawMessage `json:"respond,omitempty"` - Terminal bool `json:"terminal"` + Terminal bool `json:"terminal,omitempty"` // decoded values matchers []RequestMatcher -- cgit v1.2.3