|
1 |
| -# gophercloud: the OpenStack SDK for Go |
| 1 | +# Gophercloud: the OpenStack SDK for Go |
2 | 2 | [](https://travis-ci.org/rackspace/gophercloud)
|
3 | 3 |
|
4 |
| -gophercloud is a flexible SDK that allows you to consume and work with OpenStack |
| 4 | +Gophercloud is a flexible SDK that allows you to consume and work with OpenStack |
5 | 5 | clouds in a simple and idiomatic way using golang. Many services are supported,
|
6 | 6 | including Compute, Block Storage, Object Storage, Networking, and Identity.
|
7 | 7 | Each service API is backed with getting started guides, code samples, reference
|
8 | 8 | documentation, unit tests and acceptance tests.
|
9 | 9 |
|
10 | 10 | ## Useful links
|
11 | 11 |
|
12 |
| -* [gophercloud homepage](http://gophercloud.io) |
| 12 | +* [Gophercloud homepage](http://gophercloud.io) |
13 | 13 | * [Reference documentation](http://godoc.org/github.com/rackspace/gophercloud)
|
14 | 14 | * [Getting started guides](http://gophercloud.io/docs)
|
15 | 15 | * [Effective Go](https://golang.org/doc/effective_go.html)
|
16 | 16 |
|
17 | 17 | ## How to install
|
18 | 18 |
|
19 | 19 | Before installing, you need to ensure that your [GOPATH environment variable](https://golang.org/doc/code.html#GOPATH)
|
20 |
| -is pointing to an appropriate directory where you want to install gophercloud: |
| 20 | +is pointing to an appropriate directory where you want to install Gophercloud: |
21 | 21 |
|
22 | 22 | ```bash
|
23 | 23 | mkdir $HOME/go
|
24 | 24 | export GOPATH=$HOME/go
|
25 | 25 | ```
|
26 | 26 |
|
27 |
| -Once this is set up, you can install the gophercloud package like so: |
| 27 | +To protect yourself against changes in your dependencies, we highly recommend choosing a |
| 28 | +[dependency management solution](https://code.google.com/p/go-wiki/wiki/PackageManagementTools) for |
| 29 | +your projects, such as [godep](https://github.com/tools/godep). Once this is set up, you can install |
| 30 | +Gophercloud as a dependency like so: |
28 | 31 |
|
29 | 32 | ```bash
|
30 | 33 | go get github.com/rackspace/gophercloud
|
| 34 | + |
| 35 | +# Edit your code to import relevant packages from "github.com/rackspace/gophercloud" |
| 36 | + |
| 37 | +godep save ./... |
31 | 38 | ```
|
32 | 39 |
|
33 |
| -This will install all the source files you need into a `pkg` directory, which is |
34 |
| -referenceable from your own source files. |
| 40 | +This will install all the source files you need into a `Godeps/_workspace` directory, which is |
| 41 | +referenceable from your own source files when you use the `godep go` command. |
35 | 42 |
|
36 | 43 | ## Getting started
|
37 | 44 |
|
@@ -60,9 +67,9 @@ prompted for your password.
|
60 | 67 | ### Authentication
|
61 | 68 |
|
62 | 69 | Once you have access to your credentials, you can begin plugging them into
|
63 |
| -gophercloud. The next step is authentication, and this is handled by a base |
| 70 | +Gophercloud. The next step is authentication, and this is handled by a base |
64 | 71 | "Provider" struct. To get one, you can either pass in your credentials
|
65 |
| -explicitly, or tell gophercloud to use environment variables: |
| 72 | +explicitly, or tell Gophercloud to use environment variables: |
66 | 73 |
|
67 | 74 | ```go
|
68 | 75 | import (
|
|
0 commit comments