From 545f28008e0175491af030f8689cab2112fda9ed Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 11 Apr 2019 20:42:55 -0600 Subject: Begin implementing error handling and re-handling --- caddy.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'caddy.go') diff --git a/caddy.go b/caddy.go index 1e9829e..36c9239 100644 --- a/caddy.go +++ b/caddy.go @@ -161,10 +161,8 @@ func (d *Duration) UnmarshalJSON(b []byte) error { return nil } -// MarshalJSON satisfies json.Marshaler. -func (d Duration) MarshalJSON() ([]byte, error) { - return []byte(fmt.Sprintf(`"%s"`, time.Duration(d).String())), nil -} +// CtxKey is a value type for use with context.WithValue. +type CtxKey string // currentCfg is the currently-loaded configuration. var ( -- cgit v1.2.3