mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
ent/gen: use error.New for errors without format (#2764)
This commit is contained in:
@@ -10,7 +10,7 @@ in the LICENSE file in the root directory of this source tree.
|
||||
// BeginTx returns a transactional client with specified options.
|
||||
func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) {
|
||||
if _, ok := c.driver.(*txDriver); ok {
|
||||
return nil, fmt.Errorf("ent: cannot start a transaction within a transaction")
|
||||
return nil, errors.New("ent: cannot start a transaction within a transaction")
|
||||
}
|
||||
tx, err := c.driver.(interface {
|
||||
BeginTx(context.Context, *sql.TxOptions) (dialect.Tx, error)
|
||||
|
||||
Reference in New Issue
Block a user