mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
entc/gen: change <E>WithError signature to <E>Err (#322)
<E>WithError is too verbose and we like short names
This commit is contained in:
@@ -35,9 +35,9 @@ type GroupEdges struct {
|
||||
loadedTypes [1]bool
|
||||
}
|
||||
|
||||
// UsersWithError returns the Users value or an error if the edge
|
||||
// UsersErr returns the Users value or an error if the edge
|
||||
// was not loaded in eager-loading.
|
||||
func (e GroupEdges) UsersWithError() ([]*User, error) {
|
||||
func (e GroupEdges) UsersErr() ([]*User, error) {
|
||||
if e.loadedTypes[0] {
|
||||
return e.Users, nil
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@ type UserEdges struct {
|
||||
loadedTypes [1]bool
|
||||
}
|
||||
|
||||
// GroupsWithError returns the Groups value or an error if the edge
|
||||
// GroupsErr returns the Groups value or an error if the edge
|
||||
// was not loaded in eager-loading.
|
||||
func (e UserEdges) GroupsWithError() ([]*Group, error) {
|
||||
func (e UserEdges) GroupsErr() ([]*Group, error) {
|
||||
if e.loadedTypes[0] {
|
||||
return e.Groups, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user