dispatchrun / net

Go package implementing WASI socket extensions
Apache License 2.0
137 stars 7 forks source link

mysql: always import driver #22

Closed chriso closed 1 year ago

chriso commented 1 year ago

When under GOOS=wasip1, the github.com/go-sql-driver/mysql driver is imported and automatically registered with the database/sql package. When not under GOOS=wasip1, the driver package isn't imported and so isn't registered.

This commit updates the mysql package to always import the driver and always register it with database/sql.

achille-roussel commented 1 year ago

Portability FTW!!