controld-go allows you to interact with Control D's API in Go. (obviously)
Report bug
·
Request feature
go get github.com/baptistecdr/controld-gopackage main
import (
"context"
"fmt"
"log"
"os"
"github.com/baptistecdr/controld-go"
)
func main() {
// Construct a new API object using an API token
api, err := controld.New(os.Getenv("CONTROLD_API_TOKEN"))
if err != nil {
log.Fatal(err)
}
// Most API calls require a Context
ctx := context.Background()
// Fetch details of the account
u, err := api.ListUser(ctx)
if err != nil {
log.Fatal(err)
}
// Print user details
fmt.Println(u)
}Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
Contributions are welcome!