From b1af8fd87760b34e3ff2fd3bda38f211815a0473 Mon Sep 17 00:00:00 2001 From: Terin Stock Date: Sun, 9 Mar 2025 17:47:56 +0100 Subject: [chore] remove vendor --- .../ncruces/go-sqlite3/internal/util/module.go | 43 ---------------------- 1 file changed, 43 deletions(-) delete mode 100644 vendor/github.com/ncruces/go-sqlite3/internal/util/module.go (limited to 'vendor/github.com/ncruces/go-sqlite3/internal/util/module.go') diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/util/module.go b/vendor/github.com/ncruces/go-sqlite3/internal/util/module.go deleted file mode 100644 index a308b4e23..000000000 --- a/vendor/github.com/ncruces/go-sqlite3/internal/util/module.go +++ /dev/null @@ -1,43 +0,0 @@ -package util - -import ( - "context" - - "github.com/tetratelabs/wazero/experimental" - - "github.com/ncruces/go-sqlite3/internal/alloc" -) - -type ConnKey struct{} - -type moduleKey struct{} -type moduleState struct { - sysError error - mmapState - handleState -} - -func NewContext(ctx context.Context) context.Context { - state := new(moduleState) - ctx = experimental.WithMemoryAllocator(ctx, experimental.MemoryAllocatorFunc(alloc.NewMemory)) - ctx = experimental.WithCloseNotifier(ctx, state) - ctx = context.WithValue(ctx, moduleKey{}, state) - return ctx -} - -func GetSystemError(ctx context.Context) error { - // Test needed to simplify testing. - s, ok := ctx.Value(moduleKey{}).(*moduleState) - if ok { - return s.sysError - } - return nil -} - -func SetSystemError(ctx context.Context, err error) { - // Test needed to simplify testing. - s, ok := ctx.Value(moduleKey{}).(*moduleState) - if ok { - s.sysError = err - } -} -- cgit v1.2.3