From 8f7a1d6a2561bb45489430236a27b5dcb655e00c Mon Sep 17 00:00:00 2001 From: linquize Date: Sun, 18 Nov 2018 05:51:08 +0800 Subject: [PATCH] Prevent errors test fail if $GOPATH is something like /home/user/caddy (#2347) --- caddyhttp/errors/errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddyhttp/errors/errors.go b/caddyhttp/errors/errors.go index 6c97f3c1..fd09f8fb 100644 --- a/caddyhttp/errors/errors.go +++ b/caddyhttp/errors/errors.go @@ -142,7 +142,7 @@ func (h ErrorHandler) recovery(w http.ResponseWriter, r *http.Request) { } // Trim file path - delim := "/caddy/" + delim := "/github.com/mholt/caddy/" pkgPathPos := strings.Index(file, delim) if pkgPathPos > -1 && len(file) > pkgPathPos+len(delim) { file = file[pkgPathPos+len(delim):]