Go SDK

The official Taxu Go package provides idiomatic Go access to the Taxu API with context support, goroutine safety, and comprehensive error handling.

What is the Taxu Go SDK?

The Taxu Go SDK is a high-performance, goroutine-safe library designed for cloud-native applications. Built with Go's concurrency patterns and context support, it enables developers to build scalable tax and compliance systems with Go's speed and reliability.

Perfect for microservices, Kubernetes deployments, and high-throughput systems, the Go SDK provides idiomatic Go interfaces with proper error handling, context propagation, and concurrent safety for building production-grade financial and tax platforms.

Perfect For:

  • • Cloud-native microservices
  • • High-performance financial systems
  • • Kubernetes and container deployments
  • • Concurrent processing pipelines

Go Benefits:

  • • Context support for cancellation
  • • Goroutine-safe concurrency
  • • Native error handling patterns
  • • Zero-dependency design
v1.9.0
Go 1.20+

Installation

terminal
go get github.com/taxu/taxu-go

Authentication

package main

import (
    "github.com/taxu/taxu-go"
    "context"
)

func main() {
    client := taxu.NewClient("your_api_key_here")
}

Basic Usage

filing, err := client.Tax.File1099NEC(context.Background(), &taxu.File1099NECParams{
    TaxYear: 2024,
    Payer: &taxu.Payer{
        Name:    "Acme Corp",
        EIN:     "12-3456789",
        Address: "123 Business St",
    },
    Recipient: &taxu.Recipient{
        Name:    "John Contractor",
        SSN:     "123-45-6789",
        Address: "456 Worker Ave",
    },
    NonEmployeeCompensation: 15000,
})

if err != nil {
    log.Fatal(err)
}

fmt.Println(filing.ID)  // fil_1234567890

More Examples

Calculate Tax with Context

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

result, err := client.Tax.Calculate(ctx, &taxu.CalculateParams{
    Income:       85000,
    Deductions:   12000,
    FilingStatus: "single",
    State:        "CA",
})

if err != nil {
    log.Fatal(err)
}

fmt.Printf("Federal tax: $%d\n", result.FederalTax)
fmt.Printf("State tax: $%d\n", result.StateTax)