Skip to content

Instantly share code, notes, and snippets.

@nictuku
Created September 3, 2018 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nictuku/57f5f059c6df17d2358aa6ec765e3bcc to your computer and use it in GitHub Desktop.
Save nictuku/57f5f059c6df17d2358aa6ec765e3bcc to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"os"
hetzner "github.com/appscode/go-hetzner"
)
// Problem: this library and perhaps the underlying API don't seem to provide access to the server bidding stuff.
func main() {
username := "<see google docs>"
password := "<see google docs>"
client := hetzner.NewClient(username, password)
p, r, err := client.Ordering.ListProducts()
if err != nil {
fmt.Fprintf(os.Stderr, "%v", err)
fmt.Println(r)
os.Exit(1)
}
for _, prd := range p {
fmt.Printf("%#v\n", prd)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment