From 9a5f5e02999586a612995a68ad1e2f8a5362d18a Mon Sep 17 00:00:00 2001 From: Sam Xie Date: Wed, 30 Dec 2020 17:24:14 +0800 Subject: [PATCH] Conform precommit --- instrumentation/database/sql/conn.go | 8 ++++---- instrumentation/database/sql/example/main.go | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/instrumentation/database/sql/conn.go b/instrumentation/database/sql/conn.go index ba8f4eccdad..235edcb7c88 100644 --- a/instrumentation/database/sql/conn.go +++ b/instrumentation/database/sql/conn.go @@ -24,9 +24,9 @@ import ( var ( _ driver.Pinger = (*otConn)(nil) - _ driver.Execer = (*otConn)(nil) + _ driver.Execer = (*otConn)(nil) // nolint _ driver.ExecerContext = (*otConn)(nil) - _ driver.Queryer = (*otConn)(nil) + _ driver.Queryer = (*otConn)(nil) // nolint _ driver.QueryerContext = (*otConn)(nil) _ driver.Conn = (*otConn)(nil) _ driver.ConnPrepareContext = (*otConn)(nil) @@ -74,7 +74,7 @@ func (c *otConn) Ping(ctx context.Context) (err error) { } func (c *otConn) Exec(query string, args []driver.Value) (driver.Result, error) { - execer, ok := c.Conn.(driver.Execer) + execer, ok := c.Conn.(driver.Execer) // nolint if !ok { return nil, driver.ErrSkip } @@ -106,7 +106,7 @@ func (c *otConn) ExecContext(ctx context.Context, query string, args []driver.Na } func (c *otConn) Query(query string, args []driver.Value) (driver.Rows, error) { - queryer, ok := c.Conn.(driver.Queryer) + queryer, ok := c.Conn.(driver.Queryer) // nolint if !ok { return nil, driver.ErrSkip } diff --git a/instrumentation/database/sql/example/main.go b/instrumentation/database/sql/example/main.go index 335a5eb38c9..ed3e72ee699 100644 --- a/instrumentation/database/sql/example/main.go +++ b/instrumentation/database/sql/example/main.go @@ -22,6 +22,7 @@ import ( "time" _ "github.com/go-sql-driver/mysql" + "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/stdout" sdktrace "go.opentelemetry.io/otel/sdk/trace"