mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-10 18:49:02 -06:00
noms show should stream to stdout (#1456)
This commit is contained in:
committed by
Aaron Boodman
parent
1616e39373
commit
e2f7776614
@@ -38,6 +38,7 @@ func main() {
|
||||
database, value, err := spec.Value()
|
||||
util.CheckError(err)
|
||||
|
||||
fmt.Println(types.EncodedValueWithTags(value))
|
||||
types.WriteEncodedValueWithTags(os.Stdout, value)
|
||||
fmt.Fprintf(os.Stdout, "\n")
|
||||
database.Close()
|
||||
}
|
||||
|
||||
@@ -255,3 +255,9 @@ func EncodedValueWithTags(v Value) string {
|
||||
w.WriteTagged(v)
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// WriteEncodedValueWithTags writes the serialization of a value prefixed by its type.
|
||||
func WriteEncodedValueWithTags(w io.Writer, v Value) {
|
||||
hrs := &hrsWriter{w: w}
|
||||
hrs.WriteTagged(v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user