Files

24 lines
463 B
Go
Raw Permalink Normal View History

2023-02-14 11:33:41 +00:00
// Package embed embeds SQLite into your application.
//
2023-02-28 14:50:15 +00:00
// Importing package embed initializes the [sqlite3.Binary] variable
// with an appropriate build of SQLite:
//
// import _ "github.com/ncruces/go-sqlite3/embed"
2023-01-12 05:57:09 +00:00
package embed
import (
_ "embed"
2025-01-10 12:38:11 +00:00
"unsafe"
2023-01-12 05:57:09 +00:00
"github.com/ncruces/go-sqlite3"
)
//go:embed sqlite3.wasm
2025-01-10 12:38:11 +00:00
var binary string
2023-01-12 05:57:09 +00:00
func init() {
2025-11-07 11:20:03 +00:00
if sqlite3.Binary == nil {
sqlite3.Binary = unsafe.Slice(unsafe.StringData(binary), len(binary))
}
2023-01-12 05:57:09 +00:00
}