Skip to content

Instantly share code, notes, and snippets.

@msabramo
Created August 12, 2014 18:00
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 msabramo/e21a6d3a24c5aa3441c6 to your computer and use it in GitHub Desktop.
Save msabramo/e21a6d3a24c5aa3441c6 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/osutil"
)
func main() {
provider, auth_options, err := osutil.AuthOptions()
if err != nil {
panic(err)
}
acc, err := gophercloud.Authenticate(provider, auth_options)
if err != nil {
panic(err)
}
api, err := gophercloud.PopulateApi("openstack")
if err != nil {
panic(err)
}
fmt.Printf("acc = %s\n", acc)
fmt.Printf("api = %s\n", api)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment