dexcost
Go

Installation

Install the dexcost Go SDK with go get, including module details and a verification snippet.

go get github.com/DexwoxBusiness/dexcost-go

Optional extras

The SDK is a single Go module at github.com/DexwoxBusiness/dexcost-go. There are no optional install-time extras: all wrapper clients (OpenAI, Anthropic, Gemini, Bedrock, Cohere, Groq), the middleware package, and the pricing engine are included in the one module. Dependencies such as github.com/shopspring/decimal (exact-precision money arithmetic) and modernc.org/sqlite (pure-Go SQLite, no CGO required) are pulled in automatically by go get.

Optional import paths within the module that you use directly in your code:

PackageImport path
Top-level SDKgithub.com/DexwoxBusiness/dexcost-go
HTTP middleware (net/http, Gin, Echo)github.com/DexwoxBusiness/dexcost-go/middleware

Requirements

Go 1.21 or later. No CGO is required — the SQLite buffer uses modernc.org/sqlite, a pure-Go implementation.

Verify your install

After running go get, confirm the package resolves and the SDK version constant is accessible:

package main

import (
    "fmt"

    dexcost "github.com/DexwoxBusiness/dexcost-go"
)

func main() {
    fmt.Println(dexcost.Version)
}

This prints the installed SDK version (for example, 0.1.0). If the import fails, run go mod tidy and verify that github.com/DexwoxBusiness/dexcost-go appears in your go.sum.

On this page