Skip to content

moul/bearer-go

Repository files navigation

Bearer Golang

😄 Bearer API Client for Golang

GoDoc License Go Report Card GolangCI

Installation

go get github.com/Bearer/bearer-go

Usage

Get your Bearer Secret Key and integration ID from the Dashboard and use the Bearer client as follows:

import "github.com/Bearer/bearer-go"

func main() {
        // configure the default HTTP client to use Bearer
        bearer.ReplaceGlobals(bearer.Init(os.Getenv("BEARER_SECRETKEY")))

        // then use your app normally:
        resp, _ := http.Get("...")
        fmt.Println("response: ", resp)
}

See more documentation and examples on GoDoc

Development

# test
$ go test -v ./... -race

# lint
$ golint ./...