From d0c551acb5ab79efafd325f5b19c76a3de835356 Mon Sep 17 00:00:00 2001 From: kim Date: Wed, 5 Nov 2025 21:58:38 +0100 Subject: [chore] update dependencies (#4542) - github.com/minio/minio-go/v7: v7.0.95 -> v7.0.97 - github.com/ncruces/go-sqlite3: v0.29.1 -> v0.30.0 - github.com/tdewolff/minify/v2: v2.24.5 -> v2.24.6 - codeberg.org/gruf/go-mmap: fixes build for BSD platforms Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4542 Co-authored-by: kim Co-committed-by: kim --- .../ncruces/go-sqlite3/internal/util/module.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (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 index ba5754a32..a308b4e23 100644 --- a/vendor/github.com/ncruces/go-sqlite3/internal/util/module.go +++ b/vendor/github.com/ncruces/go-sqlite3/internal/util/module.go @@ -12,6 +12,7 @@ type ConnKey struct{} type moduleKey struct{} type moduleState struct { + sysError error mmapState handleState } @@ -23,3 +24,20 @@ func NewContext(ctx context.Context) context.Context { 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