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

@@ -38,9 +38,9 @@ type NodeEdges struct {
loadedTypes [2]bool
}
// PrevWithError returns the Prev value or an error if the edge
// PrevErr returns the Prev value or an error if the edge
// was not loaded in eager-loading, or loaded but was not found.
func (e NodeEdges) PrevWithError() (*Node, error) {
func (e NodeEdges) PrevErr() (*Node, error) {
if e.loadedTypes[0] {
if e.Prev == nil {
// The edge prev was loaded in eager-loading,
@@ -52,9 +52,9 @@ func (e NodeEdges) PrevWithError() (*Node, error) {
return nil, &NotLoadedError{edge: "prev"}
}
// NextWithError returns the Next value or an error if the edge
// NextErr returns the Next value or an error if the edge
// was not loaded in eager-loading, or loaded but was not found.
func (e NodeEdges) NextWithError() (*Node, error) {
func (e NodeEdges) NextErr() (*Node, error) {
if e.loadedTypes[1] {
if e.Next == nil {
// The edge next was loaded in eager-loading,