diff --git a/caddyfile.go b/caddyfile.go index 096a30f..f61e268 100644 --- a/caddyfile.go +++ b/caddyfile.go @@ -124,21 +124,21 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) // UnmarshalCaddyfile sets up the handler from Caddyfile // -// :4000 { -// reverse_proxy yourserver:5000 -// http_cache { -// match_path /assets -// match_header Content-Type image/jpg image/png -// status_header X-Cache-Status -// default_max_age 15m -// path /tmp/caddy-cache +// :4000 { +// reverse_proxy yourserver:5000 +// http_cache { +// match_path /assets +// match_header Content-Type image/jpg image/png +// status_header X-Cache-Status +// default_max_age 15m +// path /tmp/caddy-cache // -// distributed consul { -// service_name -// addr -// } -// } -// } +// distributed consul { +// service_name +// addr +// } +// } +// } func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { config := getDefaultConfig() diff --git a/cmd/main.go b/cmd/main.go index 5bfbe06..675c0d6 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -19,11 +19,10 @@ // There is no need to modify the Caddy source code to customize your // builds. You can easily build a custom Caddy with these simple steps: // -// 1. Copy this file (main.go) into a new folder -// 2. Edit the imports below to include the modules you want plugged in -// 3. Run `go mod init caddy` -// 4. Run `go install` or `go build` - you now have a custom binary! -// +// 1. Copy this file (main.go) into a new folder +// 2. Edit the imports below to include the modules you want plugged in +// 3. Run `go mod init caddy` +// 4. Run `go install` or `go build` - you now have a custom binary! package main import ( diff --git a/endpoint.go b/endpoint.go index d9672b7..8027405 100644 --- a/endpoint.go +++ b/endpoint.go @@ -36,12 +36,12 @@ type cachePurge struct{} // PurgePayload holds the field which will be unmarshalled from the request's body // NOTE: the format of URI can contains the query param. // ex. when the client send a delete request with the body -// { -// "method": "GET", -// "hots": "example.com", -// "uri": "/static?ext=txt", -// } // +// { +// "method": "GET", +// "hots": "example.com", +// "uri": "/static?ext=txt", +// } type PurgePayload struct { Method string `json:"method"` Host string `json:"host"` diff --git a/extends/distributed/caddyfile.go b/extends/distributed/caddyfile.go index 9314ac5..fd28374 100644 --- a/extends/distributed/caddyfile.go +++ b/extends/distributed/caddyfile.go @@ -27,12 +27,13 @@ func getDefaultConfig() *Config { } // UnmarshalCaddyfile deserializes Caddyfile tokens into consulservice's config -// distributed consul { -// service_name -// addr -// token -// health_url -// } +// +// distributed consul { +// service_name +// addr +// token +// health_url +// } func (c *ConsulService) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { config := getDefaultConfig() diff --git a/extends/influxlog/Caddyfile.go b/extends/influxlog/Caddyfile.go index 1799188..a3ddfc7 100644 --- a/extends/influxlog/Caddyfile.go +++ b/extends/influxlog/Caddyfile.go @@ -25,12 +25,13 @@ func getDefaultConfig() *Config { } // UnmarshalCaddyfile deserializes Caddyfile tokens into influxlog config -// influxlog { -// addr -// token -// organization -// bucket -// } +// +// influxlog { +// addr +// token +// organization +// bucket +// } func (s *Writer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { config := getDefaultConfig() diff --git a/extends/storage/caddyfile.go b/extends/storage/caddyfile.go index 8caa171..9ab193e 100644 --- a/extends/storage/caddyfile.go +++ b/extends/storage/caddyfile.go @@ -25,11 +25,12 @@ func getDefaultConfig() *Config { } // UnmarshalCaddyfile deserialize Caddyfile tokens into consul storage's config -// storage consul { -// addr -// token -// key_prefix -// } +// +// storage consul { +// addr +// token +// key_prefix +// } func (s *Storage) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { config := getDefaultConfig()