diff --git a/go.mod b/go.mod index cf5f13e..324b661 100644 --- a/go.mod +++ b/go.mod @@ -8,4 +8,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 ) -require github.com/elliotchance/orderedmap/v2 v2.2.0 // indirect +require ( + github.com/Nigel2392/mux v1.2.4 // indirect + github.com/elliotchance/orderedmap/v2 v2.2.0 // indirect +) diff --git a/go.sum b/go.sum index 94f8abf..432cd1c 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/Nigel2392/goldcrest v1.0.4 h1:Xx+QLht6QjJ3Gg9uksgc6Ye1XjbtzQ1208ClZwoVWsg= github.com/Nigel2392/goldcrest v1.0.4/go.mod h1:UpnPrYJqZY/b7TkoVKdoNNPKTlQtld+fsrZEA98c1c0= +github.com/Nigel2392/mux v1.2.4 h1:nS/Yeo3DQhQLFcLIuObhqCg9Ay1XD6EYJYiAro0AFn0= +github.com/Nigel2392/mux v1.2.4/go.mod h1:Hrj90gq33BCcFy8167rU03oBr2YIQMRvNkMf9JnRcAU= github.com/elliotchance/orderedmap/v2 v2.2.0 h1:7/2iwO98kYT4XkOjA9mBEIwvi4KpGB4cyHeOFOnj4Vk= github.com/elliotchance/orderedmap/v2 v2.2.0/go.mod h1:85lZyVbpGaGvHvnKa7Qhx7zncAdBIBq6u56Hb1PRU5Q= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff --git a/main.go b/main.go index 093b207..42618ca 100644 --- a/main.go +++ b/main.go @@ -329,7 +329,7 @@ func main() { ) var server = &http.Server{ Addr: addr, - Handler: qg, + Handler: qg.HttpHandler(), } if qg.Config.TLSKey != "" && qg.Config.TLSCert != "" { diff --git a/quickgo/_templates/file.tmpl b/quickgo/_templates/file.tmpl index e240679..853b022 100644 --- a/quickgo/_templates/file.tmpl +++ b/quickgo/_templates/file.tmpl @@ -3,6 +3,19 @@ {{define "content"}}
{{.Content}}+