summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2024-12-23 22:31:56 +0600
committerunwox <me@unwox.com>2024-12-23 22:31:56 +0600
commit48e16bc1264aab6c5397880c3eb92c17e1e837fd (patch)
tree7e8ef1331da309824f21a8d8d757e56af667fbdf /main.go
parent7a052182c038dab42000ca3ea0cf7de601eeb07b (diff)
small improvements
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.go b/main.go
index 8b32585..5530a06 100644
--- a/main.go
+++ b/main.go
@@ -25,7 +25,7 @@ var debug bool
func main() {
lAddr := flag.String("l", "127.0.0.1:3000", "Address HTTP-server will listen to")
wrksNum := flag.Int("n", runtime.NumCPU(), "Number of HTTP-workers to start")
- dbg := flag.Bool("D", false, "Debug mode")
+ dbg := flag.Bool("D", false, "Debug/development mode")
flag.Parse()
debug = *dbg
@@ -398,15 +398,15 @@ func main() {
module["http"] = httpModule
module["db"] = dbModule
module["utf8"] = utf8Module
- module["repl"] = func (l *Lua) int {
- var repl LuaRef
- err := l.Scan(&repl)
+ module["evalfn"] = func (l *Lua) int {
+ var evalFn LuaRef
+ err := l.Scan(&evalFn)
if err != nil {
return luaErr(l, err)
}
for _, wrk := range wrks {
if wrk.HasSameLua(l) {
- wrk.repl = &repl
+ wrk.evalFn = &evalFn
break
}
}
@@ -461,7 +461,7 @@ func main() {
}
func printUsage() {
- fmt.Printf("usage: %s [luafile]\n", os.Args[0])
+ fmt.Printf("Usage: %s [options] LUAFILE\n", os.Args[0])
flag.PrintDefaults()
os.Exit(2)
}