bsondecoder

package
v0.0.0-...-dc1fca4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

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
}

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL