Skip to content

Commit dec24b8

Browse files
authored
Add: GetHandle and GetConfig to give access to the C handle in Golang (#705)
1 parent 34d5b8c commit dec24b8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

golang/lib.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,16 @@ func Version() string {
276276
return C.GoString(C.usearch_version())
277277
}
278278

279+
// GetHandle returns the C index handel.
280+
func (index *Index) GetHandle() C.usearch_index_t {
281+
return index.handle
282+
}
283+
284+
// GetConfig returns the index config.
285+
func (index *Index) GetConfig() IndexConfig {
286+
return index.config
287+
}
288+
279289
// Len returns the number of vectors in the index.
280290
func (index *Index) Len() (len uint, err error) {
281291
var errorMessage *C.char

0 commit comments

Comments
 (0)