From 5137859e47678aae81e178ca7d164f9e2b4e3121 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 14 Jun 2019 11:58:28 -0600 Subject: Rename caddy2 -> caddy Removes the version from the package name --- modules/caddyhttp/server.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules/caddyhttp/server.go') diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index a2199ca..3de82f6 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -8,17 +8,17 @@ import ( "net/http" "strconv" - "github.com/caddyserver/caddy2" - "github.com/caddyserver/caddy2/modules/caddytls" + "github.com/caddyserver/caddy" + "github.com/caddyserver/caddy/modules/caddytls" ) // Server is an HTTP server. type Server struct { Listen []string `json:"listen,omitempty"` - ReadTimeout caddy2.Duration `json:"read_timeout,omitempty"` - ReadHeaderTimeout caddy2.Duration `json:"read_header_timeout,omitempty"` - WriteTimeout caddy2.Duration `json:"write_timeout,omitempty"` - IdleTimeout caddy2.Duration `json:"idle_timeout,omitempty"` + ReadTimeout caddy.Duration `json:"read_timeout,omitempty"` + ReadHeaderTimeout caddy.Duration `json:"read_header_timeout,omitempty"` + WriteTimeout caddy.Duration `json:"write_timeout,omitempty"` + IdleTimeout caddy.Duration `json:"idle_timeout,omitempty"` MaxHeaderBytes int `json:"max_header_bytes,omitempty"` Routes RouteList `json:"routes,omitempty"` Errors *httpErrorConfig `json:"errors,omitempty"` @@ -38,8 +38,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { } // set up the context for the request - repl := caddy2.NewReplacer() - ctx := context.WithValue(r.Context(), caddy2.ReplacerCtxKey, repl) + repl := caddy.NewReplacer() + ctx := context.WithValue(r.Context(), caddy.ReplacerCtxKey, repl) ctx = context.WithValue(ctx, TableCtxKey, make(map[string]interface{})) // TODO: Implement this r = r.WithContext(ctx) @@ -127,4 +127,4 @@ type httpErrorConfig struct { } // TableCtxKey is the context key for the request's variable table. -const TableCtxKey caddy2.CtxKey = "table" +const TableCtxKey caddy.CtxKey = "table" -- cgit v1.2.3