-
I need to parse a big JSON file from the goja. File coming from stdin in Go. I don’t want to accumulate the file in Go to reduce memory footprint. Is is possible to write a sync function in goja to get a “chuck” of stdin? Read stdin from goja in a sync way? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
dop251
May 1, 2023
Replies: 1 comment
-
Yes, you can |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
antonmedv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can
Set
any Go function on*Runtime
or on an*Object
and call it from javascript. Sync is the default mode of operations unless you use the EventLoop from goja_nodejs or similar.