mirror of
https://github.com/moby/moby.git
synced 2025-12-10 21:42:47 +03:00
19 lines
281 B
Go
19 lines
281 B
Go
// +build cgo
|
|
|
|
package graphdb
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
_ "code.google.com/p/gosqlite/sqlite3" // registers sqlite
|
|
)
|
|
|
|
func NewSqliteConn(root string) (*Database, error) {
|
|
conn, err := sql.Open("sqlite3", root)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return NewDatabase(conn)
|
|
}
|