func Version() (major, minor, patch int) The Go package is a cgo layer over the C library, fetched as a module:
go get github.com/unum-cloud/ustore/golang@mainA commit pins a build instead of @main, and Go records it in go.sum as a pseudo-version.
The package links libustore_static and reads the headers from the module’s own c/, so the archive must sit on the linker’s path, such as /usr/local/lib, or be named through CGO_LDFLAGS. USTORE_MODALITIES, set when configuring the archive, lists the modalities it compiles beside blobs, strings;docs;graph;pages by default, and Modality.Compiled reports whether it holds one, while creating a collection of any other answers StatusUnsupported.
From a checkout of the repository, for the current shell:
cmake -B build_release -D CMAKE_BUILD_TYPE=Release
cmake --build build_release --target ustore_static
export CGO_LDFLAGS="-L$PWD/build_release" # or install the archiveThen import the package under the ustore name the examples below use:
import ustore "github.com/unum-cloud/ustore/golang"API
Functions
VersionVersion reports the major, minor and patch version of the library the program runs against.
VersionNameVersionName reports the version of the library the program runs against, pre-release suffix included, such as "1.0.0-rc.1".
func VersionName() string