Replace DecodeSchema and DecodeSchemaJSON with something like NewSchemaDecoder and NewJSONSchemaDecoder.
I'd like to mirror the JSON decoder API to provide a Buffered() method that returns an io.Reader.
- func (Decoder) Buffered() bufio.Reader
- func (Decoder) Decode() (Schema, error)
This makes it clearer that the io.Reader is a buffered reader, and it exposes the buffered but unconsumed contents of the Reader.
Replace
DecodeSchemaandDecodeSchemaJSONwith something likeNewSchemaDecoderandNewJSONSchemaDecoder.I'd like to mirror the JSON decoder API to provide a
Buffered()method that returns anio.Reader.This makes it clearer that the
io.Readeris a buffered reader, and it exposes the buffered but unconsumed contents of the Reader.