diff --git a/staticFiles.go b/staticFiles.go index 273d5f6..9f6a4c5 100644 --- a/staticFiles.go +++ b/staticFiles.go @@ -3,7 +3,6 @@ package main import ( "net/http" "os" - "path" "path/filepath" "strings" ) @@ -29,5 +28,5 @@ func allStaticPaths() (paths []string) { // Gets only called by registered paths func serveStaticFile(w http.ResponseWriter, r *http.Request) { - http.ServeFile(w, r, path.Join(staticFolder, r.URL.Path)) + http.ServeFile(w, r, filepath.Join(staticFolder, r.URL.Path)) } diff --git a/templateAssets.go b/templateAssets.go index 79e1c26..3bd01ba 100644 --- a/templateAssets.go +++ b/templateAssets.go @@ -90,5 +90,5 @@ func allAssetPaths() []string { // Gets only called by registered paths func serveAsset(w http.ResponseWriter, r *http.Request) { w.Header().Add("Cache-Control", "public,max-age=31536000,immutable") - http.ServeFile(w, r, path.Join(compiledAssetsFolder, r.URL.Path)) + http.ServeFile(w, r, filepath.Join(compiledAssetsFolder, r.URL.Path)) }