Created
August 1, 2020 10:28
-
-
Save spytheman/2dfc9c925e766c87e4c9023b294d2132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import json | |
| struct User { name string age int = 30 } | |
| fn main(){ | |
| u := User{ name: os.args[1..].join(' ') } | |
| smessage := json.encode(u) | |
| C.write(1, &smessage.len, 4) | |
| C.write(1, smessage.str, smessage.len) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment