mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
entc/gen: change <E>Err signature to <E>OrErr (#325)
Signed-off-by: Alex Snast <alexsn@fb.com>
This commit is contained in:
@@ -37,9 +37,9 @@ type UserEdges struct {
|
||||
loadedTypes [1]bool
|
||||
}
|
||||
|
||||
// FriendsErr returns the Friends value or an error if the edge
|
||||
// FriendsOrErr returns the Friends value or an error if the edge
|
||||
// was not loaded in eager-loading.
|
||||
func (e UserEdges) FriendsErr() ([]*User, error) {
|
||||
func (e UserEdges) FriendsOrErr() ([]*User, error) {
|
||||
if e.loadedTypes[0] {
|
||||
return e.Friends, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user