summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/internal/util/pointer.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/internal/util/pointer.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/internal/util/pointer.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/util/pointer.go b/vendor/github.com/ncruces/go-sqlite3/internal/util/pointer.go
new file mode 100644
index 000000000..eae4dae17
--- /dev/null
+++ b/vendor/github.com/ncruces/go-sqlite3/internal/util/pointer.go
@@ -0,0 +1,11 @@
+package util
+
+type Pointer[T any] struct{ Value T }
+
+func (p Pointer[T]) unwrap() any { return p.Value }
+
+type PointerUnwrap interface{ unwrap() any }
+
+func UnwrapPointer(p PointerUnwrap) any {
+ return p.unwrap()
+}