Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example in readme #7

Merged
merged 1 commit into from
Sep 22, 2014
Merged

Conversation

bfirsh
Copy link
Contributor

@bfirsh bfirsh commented Sep 22, 2014

  • client.Droplet doesn't exist
  • Image takes a string, not an int
  • Ubuntu image ID seems to have changed

@bryanl
Copy link
Contributor

bryanl commented Sep 22, 2014

Thanks for the README updates. Actually, I'd prefer I'd prefer to use image names rather than numbers. It's a bit more robust. Instead of putting a number, you should be able to create a Droplet like this:

createRequest := &godo.DropletCreateRequest{
    Name:   dropletName,
    Region: "nyc3",
    Size:   "512mb",
    Image:  "Ubuntu 14.04 x64",
 }

If you wouldn't mind updating your PR, I wouldn't mind merging it.

@bfirsh
Copy link
Contributor Author

bfirsh commented Sep 22, 2014

Hmm, doesn't seem so:

2014/09/22 11:10:52 POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.

@bryanl
Copy link
Contributor

bryanl commented Sep 22, 2014

Then that's a bug, and I'll fix it today.

@bfirsh
Copy link
Contributor Author

bfirsh commented Sep 22, 2014

Cool, thanks!

@macb
Copy link
Contributor

macb commented Sep 22, 2014

Droplet creates utilize the image's slug. The image's slug isn't necessarily the image's name. For example, the ubuntu 14.04 x64 slug is "ubuntu-14-04-x64".

So that example would be more accurate as:

createRequest := &godo.DropletCreateRequest{
    Name:   dropletName,
    Region: "nyc3",
    Size:   "512mb",
    Image:  "ubuntu-14-04-x64",
 }

- client.Droplet doesn't exist
- Image takes a string, not an int
- Ubuntu image ID seems to have changed
@bfirsh bfirsh force-pushed the fix-example-in-readme branch from cb9f855 to a7066ec Compare September 22, 2014 20:19
@bfirsh
Copy link
Contributor Author

bfirsh commented Sep 22, 2014

Ahah, there we go! Updated the commit. Thanks.

bryanl added a commit that referenced this pull request Sep 22, 2014
@bryanl bryanl merged commit 1c064ed into digitalocean:master Sep 22, 2014
caiofilipini pushed a commit to caiofilipini/godo that referenced this pull request Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants