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:
Ariel Mashraki
2020-01-30 11:12:53 +02:00
committed by GitHub
parent 27935a8c6c
commit 9e760aae58
49 changed files with 203 additions and 203 deletions

View File

@@ -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
}

View File

@@ -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
}