Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ myip Public

Command line utility for displaying public and private IP addresses

License

Notifications You must be signed in to change notification settings

clarketm/myip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command line utility for displaying public and private IP addresses.

release-badge circleci-badge

NAME:
    myip – list IP addresses.

SYNOPSIS:
    myip [ opts... ]

OPTIONS:
    -h, --help          # Show usage.
    -a, --all           # Same as -e|--ethernet, -l|--loopback, -p|--public (default).
    -l, --loopback      # Print (IPv4/IPv6) (l)oopback IP address.
    -e, --ethernet      # Print (IPv4/IPv6) (e)thernet IP address.
    -p, --public        # Print (IPv4/IPv6) public IP address.
    -v, --version       # Show version number.

EXAMPLES:
    myip -a             # list all IP addresses.

Golang

$ go get -u github.com/clarketm/myip

Source (Mac/Linux)

# List of builds: https://github.com/clarketm/myip/releases/

$ BUILD=darwin_amd64.tar.gz     # Mac (64 bit)
# BUILD=linux_amd64.tar.gz      # Linux (64 bit)

$ BIN_DIR=/usr/local/bin        # `bin` install directory
$ mkdir -p $BIN_DIR

$ curl -L https://github.com/clarketm/myip/releases/download/v1.4.1/$BUILD | tar xz -C $BIN_DIR        # install

Source (Windows)

Usage

You can see the full reference documentation for the myip package at godoc.org, or through go's standard documentation system:

$ godoc -http=:6060

# Open browser to: "http://localhost:6060/pkg/github.com/clarketm/myip"  to view godoc.

About

Command line utility for displaying public and private IP addresses

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published