README ¶ bsondecoder Usage func run(bsonPath string) error { f, e := os.Open(bsonPath) if e != nil { return e } defer f.Close() dec := bsondecoder.New(f) for { var m bson.M if e = dec.Decode(&m); e != nil { return e } log.Printf("%#v", m) } return nil } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Decoder func New(in io.Reader) *Decoder func NewUnbuffered(in io.Reader) *Decoder func (d *Decoder) Decode(i interface{}) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Decoder ¶ type Decoder struct { // contains filtered or unexported fields } func New ¶ func New(in io.Reader) *Decoder func NewUnbuffered ¶ func NewUnbuffered(in io.Reader) *Decoder func (*Decoder) Decode ¶ func (d *Decoder) Decode(i interface{}) error Source Files ¶ View all Source files decoder.go Click to show internal directories. Click to hide internal directories.