go get github.com/labstack/labstack-go
Sign up to get an API key
Create a file app.go
with the following content:
package main
import (
"fmt"
"github.com/labstack/labstack-go"
)
func main() {
client := labstack.NewClient("<ACCOUNT_ID>", "<API_KEY>")
store := client.Store()
doc, err := store.Insert("users", labstack.Document{
"name": "Jack",
"location": "Disney",
})
if err != nil {
panic(err)
}
fmt.Printf("%+v", doc)
}
From terminal run your app:
go run app.go