Guest User

Untitled

a guest
Sep 3rd, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "os"
  6.  
  7. hetzner "github.com/appscode/go-hetzner"
  8. )
  9.  
  10. // Problem: this library and perhaps the underlying API don't seem to provide access to the server bidding stuff.
  11.  
  12. func main() {
  13. username := "<see google docs>"
  14. password := "<see google docs>"
  15. client := hetzner.NewClient(username, password)
  16. p, r, err := client.Ordering.ListProducts()
  17. if err != nil {
  18. fmt.Fprintf(os.Stderr, "%v", err)
  19. fmt.Println(r)
  20. os.Exit(1)
  21. }
  22. for _, prd := range p {
  23. fmt.Printf("%#v\n", prd)
  24. }
  25.  
  26. }
Add Comment
Please, Sign In to add comment