Skip to content

Commit

Permalink
mdbx_version description string (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
battlmonstr authored Jan 9, 2024
1 parent 6eb6f70 commit 461343f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mdbx/mdbx.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ package mdbx
#cgo windows LDFLAGS: -lntdll
#cgo !android,linux LDFLAGS: -lrt
#include "mdbxgo.h"
*/
import "C"

Expand Down Expand Up @@ -162,3 +164,10 @@ CGO_CFLAGS="${CGO_CFLAGS} -DMDBX_DEBUG=1 -DMDBX_FORCE_ASSERTIONS=1 -v" go run ./
// verstr := C.mdbx_version(&maj, &min, &pat)
// return C.GoString(verstr)
//}

// Version returns the C library version string in git describe format.
//
// See mdbx_version.
func Version() string {
return C.GoString(C.mdbx_version.git.describe)
}

0 comments on commit 461343f

Please sign in to comment.