Skip to content

Commit 7d7ef61

Browse files
authored
Merge pull request #129 from digitalocean/fix-typos
Fix typos in PublicIPv6()
2 parents 96196cc + 24ddd97 commit 7d7ef61

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

droplets.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ func (d *Droplet) PrivateIPv4() (string, error) {
9191
return "", nil
9292
}
9393

94-
// PublicIPv6 returns the private IPv6 address for the Droplet.
94+
// PublicIPv6 returns the public IPv6 address for the Droplet.
9595
func (d *Droplet) PublicIPv6() (string, error) {
9696
if d.Networks == nil {
9797
return "", errNoNetworks
9898
}
9999

100-
for _, v4 := range d.Networks.V6 {
101-
if v4.Type == "public" {
102-
return v4.IPAddress, nil
100+
for _, v6 := range d.Networks.V6 {
101+
if v6.Type == "public" {
102+
return v6.IPAddress, nil
103103
}
104104
}
105105

0 commit comments

Comments
 (0)