Move handler out of cmd and into separate pacakge

This commit is contained in:
2024-12-07 02:27:34 -05:00
parent e7e31f0e60
commit 7c9e1a429e
2 changed files with 22 additions and 21 deletions

View File

@@ -12,6 +12,7 @@ import "git.tebibyte.media/sashakoshka/go-cli"
import "git.tebibyte.media/sashakoshka/step/providers"
import "git.tebibyte.media/sashakoshka/goutil/container"
import "git.tebibyte.media/sashakoshka/go-service/daemon"
import stephttp"git.tebibyte.media/sashakoshka/step/http"
import "git.tebibyte.media/sashakoshka/go-service/routines"
func main () {
@@ -45,11 +46,11 @@ func main () {
if err != nil { log.Fatal(err) }
// set up the HTTP handler
handler := handler {
environment: &environment,
directories: flagDirectories.Value == "true",
stepExt: ucontainer.NewSet(".step"),
index: []string { "index.step", "index.html", "index" },
handler := stephttp.Handler {
Environment: &environment,
Directories: flagDirectories.Value == "true",
StepExt: ucontainer.NewSet(".step"),
Index: []string { "index.step", "index.html", "index" },
}
// set up the HTTP server