package parser import ( "io" ) // Decoder is the common interface shared by parsers // cf. encoding/json, etc type Decoder interface { Decode(interface{}) error } // Encoder is the common interface shared by parsers // cf. encoding/json, etc type Encoder interface { Encode(interface{}) error } // T is the common parser interface type T interface { NewDecoder(io.Reader) Decoder NewEncoder(io.Writer) Decoder }