```golang
package main
import (
"database/sql"
"fmt"
_ "github.com/mattn/go-sqlite3"
)
type mydb *sql.DB
func (db mydb) Save(table string, data interface{}) (int, error) {
var id int
id, err := fmt.Println(data)
return id, err
}
func main() {
var db mydb
db, err := sql.Open("sqlite3", "test.db")
fmt.Println(db, err)
}
```
有疑问加站长微信联系(非本文作者)