Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #116 from azrod/devel
Browse files Browse the repository at this point in the history
Update dependency
  • Loading branch information
azrod authored May 2, 2022
2 parents a013cad + 0614248 commit 2a17c7f
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
target-branch: "devel"
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: dependabot metadata
id: metadata
uses: dependabot/[email protected].0
uses: dependabot/[email protected].1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: enable auto-merge for Dependabot PRs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# we let the report trigger content trigger a failure using the GitHub Security features.
args: "-no-fail -fmt sarif -out results.sarif ./..."
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.17.6"
go-version: "1.18.1"
- run: go build .
11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/azrod/updateip

go 1.17
go 1.18

require (
github.com/aws/aws-sdk-go v1.43.14
github.com/aws/aws-sdk-go v1.44.5
github.com/caarlos0/env/v6 v6.9.1
github.com/cloudflare/cloudflare-go v0.34.0
github.com/cloudflare/cloudflare-go v0.38.0
github.com/gorilla/mux v1.8.0
github.com/jpillora/go-tld v1.1.1
github.com/ovh/go-ovh v1.1.0
Expand All @@ -18,17 +18,18 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
)
46 changes: 12 additions & 34 deletions go.sum

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package main

// import testing
import (
"testing"

"github.com/azrod/updateip/pkg/ip"
)

func TestGetMyExternalIP(t *testing.T) {
ip, err := ip.GetMyExternalIP()
if err != nil {
t.Error(err)
}

// if ip is empty
if ip.String() == "" {
t.Error("IP is empty")
}

// if ip is not an IPv4 address
if ip.To4() == nil {
t.Error("IP is not an IPv4 address")
}

t.Log(ip)
}
3 changes: 1 addition & 2 deletions pkg/providers/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/route53"

"github.com/rs/zerolog/log"

"github.com/azrod/updateip/pkg/ip"
"github.com/rs/zerolog/log"
)

var (
Expand Down

0 comments on commit 2a17c7f

Please sign in to comment.