ip/resolver/jsonip/service.go: use http get helper
This commit is contained in:
parent
89aee8e388
commit
4731c01684
1 changed files with 2 additions and 2 deletions
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
|
||||||
|
|
||||||
|
"dnsupdater/http"
|
||||||
"dnsupdater/ip"
|
"dnsupdater/ip"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ func (s Service) Name() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s Service) Lookup(ctx context.Context) (net.IP, error) {
|
func (s Service) Lookup(ctx context.Context) (net.IP, error) {
|
||||||
resp, err := httphelper.Get(ctx, s.url, nil)
|
resp, err := http.Get(ctx, s.url, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue