Skip to content

Commit ccd2622

Browse files
committed
no need to check the driver implements the watcher interface.
because Connector.Connect is built with Go1.10 or higher.
1 parent ca1671a commit ccd2622

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

connector.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ func (c Connector) Connect(ctx context.Context) (driver.Conn, error) {
5858
}
5959

6060
// Call startWatcher for context support (From Go 1.8)
61-
if s, ok := interface{}(mc).(watcher); ok {
62-
s.startWatcher()
63-
}
61+
mc.startWatcher()
6462
if err := mc.watchCancel(ctx); err != nil {
6563
return nil, err
6664
}

0 commit comments

Comments
 (0)