Popularity
2.3
Growing
Activity
0.0
Stable
21
2
5

Programming language: Go
License: MIT License
Tags: Networking    
Latest version: v1.0.0

publicip alternatives and similar packages

Based on the "Networking" category.
Alternatively, view publicip alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of publicip or a related project?

Add another 'Networking' Package

README

publicip

This package returns the public facing IP address of the calling client (a la https://icanhazip.com, but from Go!)

GoDoc License Go Report Card codecov

Author

James Polera [email protected]

Dependencies

publicip uses Glide for dependency management. After cloning this package, run:

glide up

Credits

This package was inspired by both:

public-ip (nodejs)

OpenDNS::MyIP (Perl)

Example

package main

import (
  "fmt"
  "github.com/polera/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", myIpAddr)
  }

}


*Note that all licence references and agreements mentioned in the publicip README section above are relevant to that project's source code only.