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 лет назад
.github 8ed14cab3c Merge pull request #36 from gridfinity/remove>shiftleft 3 лет назад
.deepsource.toml e5d8bb565c Add .deepsource.toml 3 лет назад
.gitignore 76715630b9 Initial commit. 7 лет назад
.gitlab-ci.yml 67e4014570 CI: Use full path to rpmconf 3 лет назад
.mergify.yml ab66da024b Mergify: configuration update 3 лет назад
.opendnsmyip_root b583964457 multi: CI/CD integration, code coverage reporting 3 лет назад
.whitesource d8be057a52 Update .whitesource 3 лет назад
LICENSE b69e870d71 Fix typo in dependenices, test new import path 3 лет назад
README.md 85f4f50662 Update README.md 3 лет назад
SECURITY.md b69e870d71 Fix typo in dependenices, test new import path 3 лет назад
cov_report.sh 61c5509778 cov: Warn cov_report.sh is not POSIX compliant 3 лет назад
go.mod 1bd58bff86 Update dependenices 3 лет назад
go.sum 1bd58bff86 Update dependenices 3 лет назад
opendnsmyip.go b69e870d71 Fix typo in dependenices, test new import path 3 лет назад
opendnsmyip_license_test.go 5ccaad12b3 Version 1.3.0 3 лет назад
opendnsmyip_test.go 5ccaad12b3 Version 1.3.0 3 лет назад
opendnsmyip_testutil_test.go 5ccaad12b3 Version 1.3.0 3 лет назад

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,
                          )
        }
}