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

Jeff Johnson 042668a7eb Update README 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 bd8124df14 Update copyright, license, reporting info, docs. 3 years ago
README.md 02ac3fb201 Update README 3 years ago
SECURITY.md bd8124df14 Update copyright, license, reporting info, docs. 3 years ago
cov_report.sh 61c5509778 cov: Warn cov_report.sh is not POSIX compliant 3 years ago
go.mod 6ec6bb9436 Update dependencies 3 years ago
go.sum 6ec6bb9436 Update dependencies 3 years ago
opendnsmyip.go bd8124df14 Update copyright, license, reporting info, docs. 3 years ago
opendnsmyip_license_test.go bd8124df14 Update copyright, license, reporting info, docs. 3 years ago
opendnsmyip_test.go bd8124df14 Update copyright, license, reporting info, docs. 3 years ago
opendnsmyip_testutil_test.go bd8124df14 Update copyright, license, reporting info, docs. 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,
                          )
        }
}