func (c *Card) MergeImport(i interface{}) (bool, error) {
	existing, ok := i.(*Card)
	if !ok {
		return false, errors.Errorf("i is %T, not *fb.Card", i)
	}
	if c.Identity() != existing.Identity() {
		return false, errors.New("IDs don't match")
	}
	if c.Imported.IsZero() || existing.Imported.IsZero() {
		return false, errors.New("not an import")
	}
	if !c.Created.Equal(existing.Created) {
		return false, errors.New("Created timestamps don't match")
	}
	c.Rev = existing.Rev
	if c.Modified.After(existing.Modified) {
		// The new version is newer than the existing one, so update
		return true, nil
	}
	// The new version is older, so we need to use the version we just read
	c.Modified = existing.Modified
	c.Imported = existing.Imported
	return false, nil
}
// MergeImport attempts to merge i into c, returning true on success, or false
// if no merge was necessary.
MergeImport attempts to merge i into c, returning true on success, or false
if no merge was necessary.
// MergeImport attempts to merge i into c returning true on success or false // if no merge was necessary .
func (c *Card) MergeImport(i interface{}) (bool, error) {
	existing, ok := i.(*Card)
	if !ok {
		return false, errors.Errorf("i is %T, not *fb.Card", i)
	}
	if c.Identity() != existing.Identity() {
		return false, errors.New("IDs don't match")
	}
	if c.Imported.IsZero() || existing.Imported.IsZero() {
		return false, errors.New("not an import")
	}
	if !c.Created.Equal(existing.Created) {
		return false, errors.New("Created timestamps don't match")
	}
	c.Rev = existing.Rev
	if c.Modified.After(existing.Modified) {
		return true, nil
	}
	c.Modified = existing.Modified
	c.Imported = existing.Imported
	return false, nil
}
func ( c * Card ) MergeImport ( i interface { } ) ( bool , error ) { existing , ok := i . ( * Card ) if ! ok { return false , errors . Errorf ( " " , i ) } if c . Identity ( ) != existing . Identity ( ) { return false , errors . New ( " " ) } if c . Imported . IsZero ( ) || existing . Imported . IsZero ( ) { return false , errors . New ( " " ) } if ! c . Created . Equal ( existing . Created ) { return false , errors . New ( " " ) } c . Rev = existing . Rev if c . Modified . After ( existing . Modified ) { return true , nil } c . Modified = existing . Modified c . Imported = existing . Imported return false , nil }
MergeImport attempts to merge i into c, returning true on success, or false
if no merge was necessary.
MergeImport attempts to merge i into c returning true on success or false if no merge was necessary .
// The new version is newer than the existing one, so update // The new version is older, so we need to use the version we just read