diff options
| author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-25 09:56:00 +0100 | 
|---|---|---|
| committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-25 09:56:00 +0100 | 
| commit | cce21232cc83060a53ecb3a7c30d7f6fbfd7a529 (patch) | |
| tree | 5c562f71845615f324e3d450b4d4daeaad8dd54a /main | |
| parent | 6ec9d0a831849ffaf7d46b2eb4db7d56260809cf (diff) | |
| download | stred-go-cce21232cc83060a53ecb3a7c30d7f6fbfd7a529.tar | |
Now uses a buffered output for writing to improve performance
Diffstat (limited to 'main')
| -rw-r--r-- | main/main.go | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/main/main.go b/main/main.go index e6730de..0c7324b 100644 --- a/main/main.go +++ b/main/main.go @@ -40,10 +40,11 @@ func main() {  	program := Parse(tokens)  	stdin := bufio.NewReader(os.Stdin) +	stdout := bufio.NewWriter(os.Stdout)  	state := ProgramState {  		in: walk.NewJSONIn(stdin), -		out: walk.NewJSONOut(), +		out: walk.NewJSONOut(stdout),  		program: program,  	} | 
