Integrate Go SDK

This document will cover SDK installation and initialization steps

Installation

Install suprsend-go sdk

go get github.com/suprsend/suprsend-go

Initialization

For initializing SDK, you need API KEY and API SECRET.

package main

import (
  "log"

  suprsend "github.com/suprsend/suprsend-go"
)

// Initialize SDK
func main() {
  opts := []suprsend.ClientOption{
    // suprsend.WithDebug(true),
  }
  suprClient, err := suprsend.NewClient("__api_key__", "__api_secret__", opts...)
  if err != nil {
    log.Println(err)
  }
}

Replace API KEY and API SECRET with your workspace values. You will get both the tokens from Suprsend dashboard (Settings page -> "API keys" section). For more details, check the documentation on 'Workspaces'.