diff options
Diffstat (limited to 'walk/walk.go')
-rw-r--r-- | walk/walk.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/walk/walk.go b/walk/walk.go index a9b40b7..d71ae44 100644 --- a/walk/walk.go +++ b/walk/walk.go @@ -16,7 +16,7 @@ const ( MapBegin MapEnd ) -func (value TerminalValue) Pieces(out chan<- Datum) { +func (value TerminalValue) Pieces(out chan<- Atom) { out<-value } func (value TerminalValue) String() string { @@ -35,14 +35,14 @@ func (value TerminalValue) String() string { } type ValueNull struct {} -func (value ValueNull) Pieces(out chan<- Datum) { +func (value ValueNull) Pieces(out chan<- Atom) { out<-value } func (value ValueNull) String() string { return "null" } type ValueBool bool -func (value ValueBool) Pieces(out chan<- Datum) { +func (value ValueBool) Pieces(out chan<- Atom) { out<-value } func (value ValueBool) String() string { @@ -53,7 +53,7 @@ func (value ValueBool) String() string { } } type ValueNumber float64 -func (value ValueNumber) Pieces(out chan<- Datum) { +func (value ValueNumber) Pieces(out chan<- Atom) { out<-value } func (value ValueNumber) String() string { @@ -64,7 +64,7 @@ func (value ValueNumber) String() string { type StartString struct {} type EndString struct {} type ValueString string -func (value ValueString) Pieces(out chan<- Datum) { +func (value ValueString) Pieces(out chan<- Atom) { out<-StartString{} for _, char := range value { out<-char @@ -75,10 +75,10 @@ func (value ValueString) String() string { return fmt.Sprintf("\"%s\"", string(value)) } -type Datum interface {} +type Atom interface {} type WalkValue interface { - Pieces(out chan<- Datum) + Pieces(out chan<- Atom) String() string } @@ -374,6 +374,6 @@ func JsonOut(in chan WalkItem) { fmt.Print("\n") } -func ConcatData(first []Datum, second []Datum) []Datum { - return append(append([]Datum(nil), first...), second...) +func ConcatData(first []Atom, second []Atom) []Atom { + return append(append([]Atom(nil), first...), second...) } |