summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 8fb3608..5a876b9 100644
--- a/main.go
+++ b/main.go
@@ -10,9 +10,11 @@ import (
)
func main() {
+ // queue for http messages for workers to handle
msgs := make(chan interface{}, 4096)
mux := http.NewServeMux()
wrks := []*Worker{}
+ // track routes for mux to avoid registering the same route twice
routes := make(map[string]bool)
// define luna.router module
@@ -85,7 +87,7 @@ func main() {
for {
code, _ := reader.ReadString('\n')
for _, wrk := range wrks {
- if err := wrk.Run(code); err != nil {
+ if err := wrk.Eval(code); err != nil {
log.Printf("error: %s\n", err)
break
}