func (eg *entryGorm) ByName(name, tableName string) (*Entry, error) {
	var entry Entry
	db := eg.db.Table(tableName).Where("name = ?", name)
	err := first(db, &entry)
	if err != nil {
		return nil, err
	}
	return &entry, nil
}
// ByName looks up an entry by its name and returns the entry
// if it exists.
//
// If not, we will return an error
ByName looks up an entry by its name and returns the entry
if it exists.

If not, we will return an error
// ByName looks up an entry by its name and returns the entry // if it exists . // // If not we will return an error
func (eg *entryGorm) ByName(name, tableName string) (*Entry, error) {
	var entry Entry
	db := eg.db.Table(tableName).Where("name = ?", name)
	err := first(db, &entry)
	if err != nil {
		return nil, err
	}
	return &entry, nil
}
func ( eg * entryGorm ) ByName ( name , tableName string ) ( * Entry , error ) { var entry Entry db := eg . db . Table ( tableName ) . Where ( " " , name ) err := first ( db , & entry ) if err != nil { return nil , err } return & entry , nil }
ByName looks up an entry by its name and returns the entry
if it exists.
ByName looks up an entry by its name and returns the entry if it exists .