// IsFieldZero implements mapping.Fielder interface.
IsFieldZero implements mapping.Fielder interface.
// IsFieldZero implements mapping . Fielder interface .
func (p *Post) IsFieldZero(field *mapping.StructField) (bool, error) {
	switch field.Index[0] {
	case 0: 
		return p.ID == 0, nil
	case 1: 
		return p.Title == "", nil
	case 2: 
		return p.Body == "", nil
	case 3: 
		return p.Likes == 0, nil
	case 5: 
		return p.BlogID == 0, nil
	}
	return false, errors.Wrapf(mapping.ErrInvalidModelField, "provided invalid field name: '%s'", field.Name())
}
func ( p * Post ) IsFieldZero ( field * mapping . StructField ) ( bool , error ) { switch field . Index [ 0 ] { case 0 : return p . ID == 0 , nil case 1 : return p . Title == " " , nil case 2 : return p . Body == " " , nil case 3 : return p . Likes == 0 , nil case 5 : return p . BlogID == 0 , nil } return false , errors . Wrapf ( mapping . ErrInvalidModelField , " " , field . Name ( ) ) }
IsFieldZero implements mapping.Fielder interface.
IsFieldZero implements mapping . Fielder interface .
// ID // Title // Body // Likes // BlogID