entc/gen: rename FirstXID to FirstIDX (#854)

This commit is contained in:
Ariel Mashraki
2020-10-15 10:09:47 +03:00
committed by GitHub
parent 511f257f81
commit 119cdf207e
79 changed files with 165 additions and 165 deletions

View File

@@ -139,8 +139,8 @@ func (nq *NodeQuery) FirstID(ctx context.Context) (id int, err error) {
return ids[0], nil
}
// FirstXID is like FirstID, but panics if an error occurs.
func (nq *NodeQuery) FirstXID(ctx context.Context) int {
// FirstIDX is like FirstID, but panics if an error occurs.
func (nq *NodeQuery) FirstIDX(ctx context.Context) int {
id, err := nq.FirstID(ctx)
if err != nil && !IsNotFound(err) {
panic(err)