Go · Installation

Installation

import "github.com/unum-cloud/ustore" 1.0.0-rc.1 · 084197c4

Ask your coding agent about this page, or add the docs server to it

curl -s 'https://www.unum.cloud/docs/ustore/go/installation.md' | claude -p "How would this fit my code?"

The Go package is a cgo layer over the C library, fetched as a module:

go get github.com/unum-cloud/ustore/golang@main

A 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 archive

Then 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.
ustore.go:1388 ↗
func Version() (major, minor, patch int)
VersionNameVersionName reports the version of the library the program runs against, pre-release suffix included, such as "1.0.0-rc.1".
ustore.go:1396 ↗
func VersionName() string