mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user