import files, add README & LICENSE

This commit is contained in:
2026-06-29 17:06:34 -07:00
commit aecd90eb84
17 changed files with 2552 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
package cursor
// DereferenceSlice takes a slice of pointers to T and returns a slice of T by
// dereferencing each pointer and discarding any nil pointers.
func DereferenceSlice[T any](list []*T) []T {
var result []T
for _, item := range list {
if item != nil {
result = append(result, *item)
}
}
return result
}