summaryrefslogtreecommitdiff
path: root/caddy.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-04-11 20:42:55 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-04-11 20:42:55 -0600
commit545f28008e0175491af030f8689cab2112fda9ed (patch)
treedc0d769486b8e05da7c67219292e9c0f95bb7f0b /caddy.go
parentd42529348fac36f256d4e180ba1c2049f65646c1 (diff)
Begin implementing error handling and re-handling
Diffstat (limited to 'caddy.go')
-rw-r--r--caddy.go6
1 files changed, 2 insertions, 4 deletions
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 (