Skip to content

Commit

Permalink
mdbx_version description string (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
battlmonstr authored Jan 9, 2024
1 parent e364f0a commit 839cb7b
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 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 839cb7b

Please sign in to comment.