diff options
| author | unwox <me@unwox.com> | 2024-07-23 23:49:33 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-07-23 23:54:12 +0600 |
| commit | 7d1ab002530c2fe1f4c6a7cf67a16694e289b8ac (patch) | |
| tree | 6e77c35fa97068abbabda7fe88c505245e83b173 /main.go | |
| parent | cba8ff3896a59598e9f0aa946fd547002ac23aba (diff) | |
add more comments
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 } |
