diff --git a/main.go b/main.go index 72034cf9aa10f1c6a600a801681af297dcb036ec..1fc15dabdb14166d965cf31e59aaef2cb6bc8265 100644 --- a/main.go +++ b/main.go @@ -134,6 +134,10 @@ func errorHandler(errorFilesPath string) func(http.ResponseWriter, *http.Request for _, ext := range exts { var filePath string + if !strings.HasPrefix(ext, ".") { + ext = fmt.Sprintf(".%v", ext) + } + filePath = fmt.Sprintf("%v/%v%v", errorFilesPath, code, ext) if _, err = os.Stat(filePath); err == nil { file = filePath