Skip to content

Commit

Permalink
Prevent modification.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces committed Jan 10, 2025
1 parent a79ee4c commit aef7f05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions embed/bcw2/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ package bcw2

import (
_ "embed"
"unsafe"

"github.com/ncruces/go-sqlite3"
)

//go:embed bcw2.wasm
var binary []byte
var binary string

func init() {
sqlite3.Binary = binary
sqlite3.Binary = unsafe.Slice(unsafe.StringData(binary), len(binary))
}
5 changes: 3 additions & 2 deletions embed/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ package embed

import (
_ "embed"
"unsafe"

"github.com/ncruces/go-sqlite3"
)

//go:embed sqlite3.wasm
var binary []byte
var binary string

func init() {
sqlite3.Binary = binary
sqlite3.Binary = unsafe.Slice(unsafe.StringData(binary), len(binary))
}

0 comments on commit aef7f05

Please sign in to comment.