summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorherkulessi <git@herkulessi.de>2026-06-22 21:49:43 +0200
committerherkulessi <git@herkulessi.de>2026-06-22 21:49:43 +0200
commit3a635fc9dd92e91ce731abe815cde966a0e38553 (patch)
treef36e4d79685b50add5f407c48d5ba3d968de7529 /main.go
parent9406e21b1e728c1e99b4edcdf1b5e02c76a1ffe7 (diff)
Make IsDynamic public
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files 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()))
}