diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2023-07-19 11:57:59 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-07-19 11:57:59 +0100 |
commit | 8cf10efe3b5a1bcc70bc6e5590ee63fd5eb00c5b (patch) | |
tree | 7a16883c17c2bdcc49b2f9d4f333dfc76c66248f /json_tokens/write.go | |
parent | 3c34366bdd5d817a184d6b1c901d03a16b6faa4b (diff) | |
download | stred-go-8cf10efe3b5a1bcc70bc6e5590ee63fd5eb00c5b.tar |
Huge refactor to a more value based system, doing away with terminals. Also introduces unit testing
Diffstat (limited to 'json_tokens/write.go')
-rw-r--r-- | json_tokens/write.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/json_tokens/write.go b/json_tokens/write.go index 813f2f3..78ed186 100644 --- a/json_tokens/write.go +++ b/json_tokens/write.go @@ -29,7 +29,7 @@ func (out *JSONOut) indent(adjust int) { fmt.Fprint(out.writer, strings.Repeat("\t", len(out.structure) - 1 + adjust)) } -func (out *JSONOut) atomOut(key string, atom walk.Atom) { +func (out *JSONOut) atomOut(key string, atom walk.AtomOLD) { state := out.structure[len(out.structure) - 1] switch state { case JSONOutRoot, JSONOutMap, JSONOutArray: @@ -115,7 +115,7 @@ func (out *JSONOut) atomOut(key string, atom walk.Atom) { } } -func (out *JSONOut) Print(path walk.Path, values []walk.Atom) { +func (out *JSONOut) Print(path walk.Path, values []walk.AtomOLD) { var segment walk.PathSegment if len(path) > 0 { segment = path[len(path) - 1] |