Godo

Last verified 6 Nov 2026

Godo is DigitalOcean’s official Go client library for the DigitalOcean API, which lets you programmatically manage Droplets, Kubernetes clusters, databases, and other DigitalOcean resources with conventional HTTP requests.

Installation

Install the module:

go get github.com/digitalocean/godo

Quickstart

Authenticate with a personal access token. Set your token as an environment variable before running the example:

export DIGITALOCEAN_TOKEN=<your-api-token>

Create a client and list your Droplets:

package main

import (
    "context"
    "fmt"
    "os"

    "github.com/digitalocean/godo"
)

func main() {
    client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))

    droplets, _, err := client.Droplets.List(context.Background(), &godo.ListOptions{})
    if err != nil {
        fmt.Printf("Error: %s\n", err)
        return
    }

    for _, d := range droplets {
        fmt.Printf("%d: %s\n", d.ID, d.Name)
    }
}

More Information

DigitalOcean Godo Go Library Reference

Reference for the services and methods in Godo, the official Go client for the DigitalOcean API.

GitHub - digitalocean/godo

The Godo GitHub repository.

github.com
pkg.go.dev reference

Full Go package documentation for Godo.

pkg.go.dev
SDK and Client Libraries

All official and community client libraries.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.