opendnsmyip: A Go package to return the public-facing IPv4 address of the client (by querying the Cisco OpenDNS servers).

Jeff Johnson 039579ddb7 CI/CD: Simplify build system, use latest Go stable 3 years ago
.github 8ed14cab3c Merge pull request #36 from gridfinity/remove>shiftleft 3 years ago
.deepsource.toml f5e6f99868 Update .deepsource.toml 3 years ago
.gitignore 76715630b9 Initial commit. 7 years ago
.gitlab-ci.yml d57c856bd2 CI/CD: Simplify build system, use latest Go stable 3 years ago
.mergify.yml ab66da024b Mergify: configuration update 3 years ago
.opendnsmyip_root b583964457 multi: CI/CD integration, code coverage reporting 3 years ago
.whitesource d8be057a52 Update .whitesource 3 years ago
LICENSE d197a2ec2f - Happy New Year - 3 years ago
README.md 85f4f50662 Update README.md 3 years ago
SECURITY.md b69e870d71 Fix typo in dependenices, test new import path 3 years ago
cov_report.sh 61c5509778 cov: Warn cov_report.sh is not POSIX compliant 3 years ago
go.mod d197a2ec2f - Happy New Year - 3 years ago
go.sum d197a2ec2f - Happy New Year - 3 years ago
opendnsmyip.go d197a2ec2f - Happy New Year - 3 years ago
opendnsmyip_license_test.go d197a2ec2f - Happy New Year - 3 years ago
opendnsmyip_test.go d197a2ec2f - Happy New Year - 3 years ago
opendnsmyip_testutil_test.go d197a2ec2f - Happy New Year - 3 years ago

README.md

opendnsmyip

A Go package that returns the public-facing IPv4 address of the client by querying the Cisco OpenDNS servers.

License GoVersion PkgGoDev GoReportCard GitHubRelease LocCount GitHubCodeSize CoverageStatus CodacyBadge CodebeatBadge CodeClimateMaintainability TickgitTODOs DeepSource DeepScanGrade FOSSA Status

Availability

Go Modules

Source Code

Issue Tracking

Security Policy

Original Authors

Coverage Reports

Credits

This package was inspired by:

License

Usage

package main

import (
        "fmt"

        myip "go.gridfinity.dev/opendnsmyip"
)

func main() {
        myIpAddr, err := myip.GetIP()
        if err != nil {
                fmt.Errorf(
                           "Error getting IPv4 address: %v",
                           err,
                          )
        } else {
                fmt.Printf(
                           "Public IPv4 address is: %s",
                           myIpAddr,
                          )
        }
}