كل حِزم SDK

Go

v0.4.2

github.com/AllStak/allstak-go

التثبيت

تعذّر تحميل README من GitHub. نعرض هنا تعليمات التثبيت المخزّنة من سجل SDK.

go
go get github.com/AllStak/allstak-go

البدء السريع

package main

import (
    "context"
    "errors"
    "os"

    allstak "github.com/AllStak/allstak-go"
)

func main() {
    client := allstak.New(allstak.Config{
        APIKey: os.Getenv("ALLSTAK_API_KEY"),
        Environment: "production",
        Release: "[email protected]",
        ServiceName: "myapp-api",
    })
    defer client.Close(context.Background())

    client.CaptureException(context.Background(), errors.New("hello from allstak-go"))
}