Skip to content

Commit

Permalink
interp: Return []byte value as a buffer for now
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Oct 19, 2021
1 parent ce044ba commit 58bf069
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/interp/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func valueHas(key interface{}, a func(name string) interface{}, b func(key inter
return b(key)
}

func makeDecodeValue(dv *decode.Value) DecodeValue {
func makeDecodeValue(dv *decode.Value) interface{} {
switch vv := dv.V.(type) {
case decode.Array:
return NewArrayDecodeValue(dv, vv)
Expand Down Expand Up @@ -96,10 +96,8 @@ func makeDecodeValue(dv *decode.Value) DecodeValue {
decodeValueBase: decodeValueBase{dv},
}
case []byte:
return decodeValue{
JQValue: gojqextra.String(string(vv)),
decodeValueBase: decodeValueBase{dv},
}
// TODO: not sure about this
return bufferViewFromBuffer(bitio.NewBufferFromBytes(vv, -1), 8)
case []interface{}:
return decodeValue{
JQValue: gojqextra.Array(vv),
Expand Down

0 comments on commit 58bf069

Please sign in to comment.