Compare commits

...

4 Commits

Author SHA1 Message Date
sammyette 6edf1c7733
Merge f312cc2cac into 9d5f5abef4 2023-12-24 17:23:31 -05:00
sammyette 9d5f5abef4
feat: add pprof 2023-12-18 21:31:04 -04:00
sammyette a0513c0a05
chore: merge 2023-12-06 22:21:11 -04:00
sammyette 1d64a57e24
fix: return if runner did not return table 2023-12-06 22:20:41 -04:00
2 changed files with 17 additions and 0 deletions

View File

@ -175,6 +175,9 @@ func runLuaRunner(runr rt.Value, userInput string) (input string, exitCode uint8
runnerRet := term.Get(0)
if runner, ok = runnerRet.TryTable(); !ok {
fmt.Fprintln(os.Stderr, "runner did not return a table")
exitCode = 125
input = userInput
return
}
if code, ok := runner.Get(rt.StringValue("exitCode")).TryInt(); ok {

14
pprof.go 100644
View File

@ -0,0 +1,14 @@
// +build pprof
package main
import (
_ "net/http/pprof"
"net/http"
)
func init() {
go func() {
http.ListenAndServe("localhost:8080", nil)
}()
}