Godeps/_workspace/src/gopkg.in/mgo.v2/session.go
func (c *Collection) Update(selector interface{}, update interface{}) error {
	lerr, err := c.writeQuery(&updateOp{c.FullName, selector, update, 0})
	if err == nil && lerr != nil && !lerr.UpdatedExisting {
		return ErrNotFound
	}
	return err
}
func (c *Collection) Update(selector interface{}, update interface{}) error {
	lerr, err := c.writeQuery(&updateOp{c.FullName, selector, update, 0})
	if err == nil && lerr != nil && !lerr.UpdatedExisting {
		return ErrNotFound
	}
	return err
}
func ( c * Collection ) Update ( selector interface { } , update interface { } ) error { lerr , err := c . writeQuery ( & updateOp { c . FullName , selector , update , 0 } ) if err == nil && lerr != nil && ! lerr . UpdatedExisting { return ErrNotFound } return err }
// Update finds a single document matching the provided selector document
// and modifies it according to the update document.
// If the session is in safe mode (see SetSafe) a ErrNotFound error is
// returned if a document isn't found, or a value of type *LastError
// when some other error is detected.
//
// Relevant documentation:
//
//     http://www.mongodb.org/display/DOCS/Updating
//     http://www.mongodb.org/display/DOCS/Atomic+Operations
//
Update finds a single document matching the provided selector document and modifies it according to the update document . If the session is in safe mode ( see SetSafe ) a ErrNotFound error is returned if a document isn t found or a value of type * LastError when some other error is detected . Relevant documentation : http : // www . mongodb . org / display / DOCS / Updating http : // www . mongodb . org / display / DOCS / Atomic + Operations