Skip to content

Commit

Permalink
removed ununsed calls
Browse files Browse the repository at this point in the history
  • Loading branch information
fmartingr committed Dec 28, 2023
1 parent 1310b71 commit a2567bc
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions internal/webserver/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,10 @@ import (
"html/template"
"io"
"net"
"net/http"
nurl "net/url"
"os"
"syscall"
)

func createRedirectURL(newPath, previousPath string) string {
urlQueries := nurl.Values{}
urlQueries.Set("dst", previousPath)

redirectURL, _ := nurl.Parse(newPath)
redirectURL.RawQuery = urlQueries.Encode()
return redirectURL.String()
}

func redirectPage(w http.ResponseWriter, r *http.Request, url string) {
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
w.Header().Set("Pragma", "no-cache")
w.Header().Set("Expires", "0")
http.Redirect(w, r, url, http.StatusMovedPermanently)
}

func FileExists(filePath string) bool {
info, err := os.Stat(filePath)
return err == nil && !info.IsDir()
Expand Down

0 comments on commit a2567bc

Please sign in to comment.