Move handler out of cmd and into separate pacakge
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user