diff --git a/ip/resolver/basic_http/service.go b/ip/resolver/http/service.go similarity index 97% rename from ip/resolver/basic_http/service.go rename to ip/resolver/http/service.go index cbf0829..2ee5193 100644 --- a/ip/resolver/basic_http/service.go +++ b/ip/resolver/http/service.go @@ -1,4 +1,4 @@ -package basic_http +package http import ( "context" diff --git a/ip/resolver/basic_http/service_test.go b/ip/resolver/http/service_test.go similarity index 99% rename from ip/resolver/basic_http/service_test.go rename to ip/resolver/http/service_test.go index 6495462..3fd98c7 100644 --- a/ip/resolver/basic_http/service_test.go +++ b/ip/resolver/http/service_test.go @@ -1,4 +1,4 @@ -package basic_http +package http import ( "context" diff --git a/ip/resolver/manager.go b/ip/resolver/manager.go index 4bef103..3e32136 100644 --- a/ip/resolver/manager.go +++ b/ip/resolver/manager.go @@ -3,7 +3,7 @@ package resolver import ( "net/http" - "dnsupdater/ip/resolver/basic_http" + httpres "dnsupdater/ip/resolver/http" ) var services []Service @@ -22,18 +22,18 @@ func Get(name string) Service { } func init() { - Provide(&basic_http.Service{ + Provide(&httpres.Service{ ServiceName: "jsonip", Url: "https://jsonip.com", Decoder: JsonipDecoder, }) - Provide(&basic_http.Service{ + Provide(&httpres.Service{ ServiceName: "ifconfig.me", Url: "https://ifconfig.me/ip", }) - Provide(&basic_http.Service{ + Provide(&httpres.Service{ ServiceName: "ip.me", Url: "https://ip.me", Headers: http.Header{ @@ -41,12 +41,12 @@ func init() { }, }) - Provide(&basic_http.Service{ + Provide(&httpres.Service{ ServiceName: "ipecho", Url: "http://ipecho.net/plain", }) - Provide(&basic_http.Service{ + Provide(&httpres.Service{ ServiceName: "icanhazip", Url: "https://icanhazip.com", })