mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
all: gofmt -w -r 'interface{} -> any' (#2874)
This commit is contained in:
@@ -17,9 +17,9 @@ in the LICENSE file in the root directory of this source tree.
|
||||
{{- if $.FeatureEnabled "sql/execquery" }}
|
||||
// ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it.
|
||||
// See, database/sql#DB.ExecContext for more information.
|
||||
func (c *config) ExecContext(ctx context.Context, query string, args ...interface{}) (stdsql.Result, error) {
|
||||
func (c *config) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error) {
|
||||
ex, ok := c.driver.(interface {
|
||||
ExecContext(context.Context, string, ...interface{}) (stdsql.Result, error)
|
||||
ExecContext(context.Context, string, ...any) (stdsql.Result, error)
|
||||
})
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Driver.ExecContext is not supported")
|
||||
@@ -29,9 +29,9 @@ in the LICENSE file in the root directory of this source tree.
|
||||
|
||||
// QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it.
|
||||
// See, database/sql#DB.QueryContext for more information.
|
||||
func (c *config) QueryContext(ctx context.Context, query string, args ...interface{}) (*stdsql.Rows, error) {
|
||||
func (c *config) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error) {
|
||||
q, ok := c.driver.(interface {
|
||||
QueryContext(context.Context, string, ...interface{}) (*stdsql.Rows, error)
|
||||
QueryContext(context.Context, string, ...any) (*stdsql.Rows, error)
|
||||
})
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Driver.QueryContext is not supported")
|
||||
@@ -46,9 +46,9 @@ in the LICENSE file in the root directory of this source tree.
|
||||
{{- if $.FeatureEnabled "sql/execquery" }}
|
||||
// ExecContext allows calling the underlying ExecContext method of the transaction if it is supported by it.
|
||||
// See, database/sql#Tx.ExecContext for more information.
|
||||
func (tx *txDriver) ExecContext(ctx context.Context, query string, args ...interface{}) (stdsql.Result, error) {
|
||||
func (tx *txDriver) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error) {
|
||||
ex, ok := tx.tx.(interface {
|
||||
ExecContext(context.Context, string, ...interface{}) (stdsql.Result, error)
|
||||
ExecContext(context.Context, string, ...any) (stdsql.Result, error)
|
||||
})
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Tx.ExecContext is not supported")
|
||||
@@ -58,9 +58,9 @@ in the LICENSE file in the root directory of this source tree.
|
||||
|
||||
// QueryContext allows calling the underlying QueryContext method of the transaction if it is supported by it.
|
||||
// See, database/sql#Tx.QueryContext for more information.
|
||||
func (tx *txDriver) QueryContext(ctx context.Context, query string, args ...interface{}) (*stdsql.Rows, error) {
|
||||
func (tx *txDriver) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error) {
|
||||
q, ok := tx.tx.(interface {
|
||||
QueryContext(context.Context, string, ...interface{}) (*stdsql.Rows, error)
|
||||
QueryContext(context.Context, string, ...any) (*stdsql.Rows, error)
|
||||
})
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Tx.QueryContext is not supported")
|
||||
|
||||
Reference in New Issue
Block a user