Merge pull request #129 from digitalocean/fix-typos

Fix typos in PublicIPv6()
This commit is contained in:
Maurício Linhares 2017-02-27 23:59:46 -05:00 committed by GitHub
commit 7d7ef61f56
1 changed files with 4 additions and 4 deletions

View File

@ -91,15 +91,15 @@ func (d *Droplet) PrivateIPv4() (string, error) {
return "", nil
}
// PublicIPv6 returns the private IPv6 address for the Droplet.
// PublicIPv6 returns the public IPv6 address for the Droplet.
func (d *Droplet) PublicIPv6() (string, error) {
if d.Networks == nil {
return "", errNoNetworks
}
for _, v4 := range d.Networks.V6 {
if v4.Type == "public" {
return v4.IPAddress, nil
for _, v6 := range d.Networks.V6 {
if v6.Type == "public" {
return v6.IPAddress, nil
}
}