From 3a635fc9dd92e91ce731abe815cde966a0e38553 Mon Sep 17 00:00:00 2001 From: herkulessi Date: Mon, 22 Jun 2026 21:49:43 +0200 Subject: Make IsDynamic public --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 8c5766d..e25268f 100644 --- a/main.go +++ b/main.go @@ -70,7 +70,7 @@ func (w *Webpage) HandlerStatic(pattern string, handler http.Handler) *Webpage { // Returns the proper Mux for the current Request based on the request type without the magic internal mux func (w *Webpage) getHandler() http.Handler { - if w.isDynamic() { + if w.IsDynamic() { return w.muxDynamic } else { return w.muxStatic @@ -82,15 +82,15 @@ func (w *Webpage) GetHandler() http.Handler { return handler{w} } -func (w *Webpage) isDynamic() bool { +func (w *Webpage) IsDynamic() bool { return os.Getenv("PATH_INFO") == "" } func (w *Webpage) isStatic() bool { - return !w.isDynamic() + return !w.IsDynamic() } func (w *Webpage) Serve() { - if w.isDynamic() { + if w.IsDynamic() { fmt.Println("Listening on [::]:8080") panic(http.ListenAndServe(":8080", w.GetHandler())) } -- cgit v1.2.3