Files
dolt/enc/write_value.go
T
Aaron Boodman b33cab2b34 Rename package 'store' to 'chunks'.
This is in preparation for renaming the 'Commit' abstraction to
DataStore. So we will essentially have a 'chunkstore' abstraction
and a 'datastore' abstraction.
2015-06-16 16:19:16 -07:00

17 lines
314 B
Go

package enc
import (
"github.com/attic-labs/noms/chunks"
"github.com/attic-labs/noms/ref"
"github.com/attic-labs/noms/types"
)
func WriteValue(v types.Value, cs chunks.ChunkSink) (ref.Ref, error) {
switch v := v.(type) {
case types.Blob:
return blobEncode(v, cs)
default:
return jsonEncode(v, cs)
}
}