fix: add flush as sink method and fix arg amount for read

sink-enhance
sammyette 2023-02-19 13:27:48 -04:00
parent 54f89db578
commit 9e45929da7
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ func setupSinkType(rtm *rt.Runtime) {
sinkMethods := rt.NewTable() sinkMethods := rt.NewTable()
sinkFuncs := map[string]util.LuaExport{ sinkFuncs := map[string]util.LuaExport{
"read": {luaSinkRead, 0, false}, "flush": {luaSinkFlush, 1, false},
"read": {luaSinkRead, 1, false},
"write": {luaSinkWrite, 2, false}, "write": {luaSinkWrite, 2, false},
"writeln": {luaSinkWriteln, 2, false}, "writeln": {luaSinkWriteln, 2, false},
} }