Documentation
¶
Overview ¶
Package publicip returns the public facing IPv4 address of the requesting client by querying servers at OpenDNS.
Example:
package main
import (
"fmt"
"github.com/dikman/publicip"
)
func main() {
myIpAddr, err := publicip.GetIP()
if err != nil {
fmt.Printf("Error getting IP address: %s\n", err)
} else {
fmt.Printf("Public IP address is: %s\n", myIpAddr)
}
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.