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

Jeff Johnson a7be812151 Update dependenices 3 years ago
.github 8ed14cab3c Merge pull request #36 from gridfinity/remove>shiftleft 3 years ago
.deepsource.toml e5d8bb565c Add .deepsource.toml 3 years ago
.gitignore 76715630b9 Initial commit. 7 years ago
.gitlab-ci.yml 67e4014570 CI: Use full path to rpmconf 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 b69e870d71 Fix typo in dependenices, test new import path 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 1bd58bff86 Update dependenices 3 years ago
go.sum 1bd58bff86 Update dependenices 3 years ago
opendnsmyip.go b69e870d71 Fix typo in dependenices, test new import path 3 years ago
opendnsmyip_license_test.go 5ccaad12b3 Version 1.3.0 3 years ago
opendnsmyip_test.go 5ccaad12b3 Version 1.3.0 3 years ago
opendnsmyip_testutil_test.go 5ccaad12b3 Version 1.3.0 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,
                          )
        }
}