entc/gen: change <E>Err signature to <E>OrErr (#325)

Signed-off-by: Alex Snast <alexsn@fb.com>
This commit is contained in:
Alex Snast
2020-01-30 17:56:36 +01:00
committed by GitHub
parent 0802e0b4f5
commit e6ba06441b
49 changed files with 203 additions and 203 deletions

View File

@@ -35,9 +35,9 @@ type GroupEdges struct {
loadedTypes [1]bool
}
// UsersErr returns the Users value or an error if the edge
// UsersOrErr returns the Users value or an error if the edge
// was not loaded in eager-loading.
func (e GroupEdges) UsersErr() ([]*User, error) {
func (e GroupEdges) UsersOrErr() ([]*User, error) {
if e.loadedTypes[0] {
return e.Users, nil
}

View File

@@ -37,9 +37,9 @@ type UserEdges struct {
loadedTypes [1]bool
}
// GroupsErr returns the Groups value or an error if the edge
// GroupsOrErr returns the Groups value or an error if the edge
// was not loaded in eager-loading.
func (e UserEdges) GroupsErr() ([]*Group, error) {
func (e UserEdges) GroupsOrErr() ([]*Group, error) {
if e.loadedTypes[0] {
return e.Groups, nil
}