Skip to content

Commit

Permalink
定制驱动暴露原始net.Conn
Browse files Browse the repository at this point in the history
  • Loading branch information
saber-x committed Oct 16, 2024
1 parent b8ba3b3 commit a030367
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func (c *connector) Connect(ctx context.Context) (driver.Conn, error) {
}

c.connected.Store(true)
HackConn = mc.netConn
return mc, nil
}

Expand Down
7 changes: 7 additions & 0 deletions hack.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package mysql

import "net"

var (
HackConn net.Conn
)

0 comments on commit a030367

Please sign in to comment.