Registry / cloud / hetznercloud-hcloud-go-v2

hetznercloud-hcloud-go-v2

JSON →
library2.41.2gogounverified

A Go client library for the Hetzner Cloud API.

go get github.com/hetznercloud/hcloud-go/v2
INSTALL
IMPORT
SIG · HETZNERCLOUD-HCLOU
H
hetznercloud-hcloud-go-v2
cloudgov2.41.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

hcloud
✓ github.com/hetznercloud/hcloud-go/v2

Listing servers using the Hetzner Cloud API client.

package main import ( "context" "fmt" "github.com/hetznercloud/hcloud-go/v2/hcloud" ) func main() { client := hcloud.NewClient(hcloud.WithToken("your-api-token")) servers, _, err := client.Server.List(context.Background(), hcloud.ServerListOpts{}) if err != nil { fmt.Println(err) return } fmt.Printf("Found %d servers\n", len(servers)) }
Debug
Known issues
breakingVersion 2 has breaking API changes from v1.
fix
Use import path github.com/hetznercloud/hcloud-go/v2 and update code.
affects: >=2.0.0
Upgrade
Version history
2.41.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
Bingbot
1
Resources
hetznercloud-hcloud-go-v2 — go get hetznercloud-hcloud-go-v2 · libregistry