Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run tests

on:
pull_request:
branches: [master]
push:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.18", "1.19", "1.20", "1.21", "1.22", "1.23", "1.24"]

steps:
- uses: actions/checkout@v4

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Build
run: go build -v ./...

- name: gofmt
run: |
unformatted_files=$(gofmt -l .)
if [ -n "$unformatted_files" ]; then
echo "The following files are not Go formatted:"
echo "$unformatted_files"
echo "Please run 'gofmt -w .' to fix them."
exit 1
fi
echo "All Go files are well formatted."
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ipinfo/go/v2

go 1.15
go 1.18

require (
github.com/patrickmn/go-cache v2.1.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion ipinfo/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For example:

info, err := ipinfo.GetIPInfo(net.ParseIP("8.8.8.8"))

Authorization
# Authorization

To perform authorized API calls with more data and higher limits, pass in a
non-empty token to NewClient. For example:
Expand Down