https://github.com/jjideenschmiede/goipify
Our little library to interact with goipify in golang.
https://github.com/jjideenschmiede/goipify
golang golang-library ipify ipify-api
Last synced: 7 months ago
JSON representation
Our little library to interact with goipify in golang.
- Host: GitHub
- URL: https://github.com/jjideenschmiede/goipify
- Owner: jjideenschmiede
- License: mit
- Created: 2021-12-06T13:12:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-06T13:20:12.000Z (over 4 years ago)
- Last Synced: 2024-12-28T15:46:21.722Z (over 1 year ago)
- Topics: golang, golang-library, ipify, ipify-api
- Language: Go
- Homepage: https://www.ipify.org/
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goipify
[](https://golang.org/) [](https://github.com/jjideenschmiede/goipify/actions/workflows/go.yml) [](https://goreportcard.com/report/github.com/jjideenschmiede/goipify) [](https://pkg.go.dev/github.com/jjideenschmiede/goipify)  [](https://jj-dev.de/)
Since we liked to access ipify's API for a small project, we developed the following library.
## Install
```console
go get github.com/jjideenschmiede/goipify
```
## How to use?
## Get your IP
With this function you get your current public IP address. You get the data back in JSON format. And you can access it directly via the Struct.
```go
// Get my ip address
ip, err := goipify.Ip()
if err != nil {
log.Fatalln(err)
} else {
log.Println(ip)
}
```