1
0
Fork 0

rename ip/resolver/basic_http to ip/resolver/http

This commit is contained in:
Henrik Hautakoski 2023-12-25 21:41:42 +01:00
parent 0ad92e8e4a
commit ae60d3bf35
3 changed files with 8 additions and 8 deletions

View file

@ -1,4 +1,4 @@
package basic_http package http
import ( import (
"context" "context"

View file

@ -1,4 +1,4 @@
package basic_http package http
import ( import (
"context" "context"

View file

@ -3,7 +3,7 @@ package resolver
import ( import (
"net/http" "net/http"
"dnsupdater/ip/resolver/basic_http" httpres "dnsupdater/ip/resolver/http"
) )
var services []Service var services []Service
@ -22,18 +22,18 @@ func Get(name string) Service {
} }
func init() { func init() {
Provide(&basic_http.Service{ Provide(&httpres.Service{
ServiceName: "jsonip", ServiceName: "jsonip",
Url: "https://jsonip.com", Url: "https://jsonip.com",
Decoder: JsonipDecoder, Decoder: JsonipDecoder,
}) })
Provide(&basic_http.Service{ Provide(&httpres.Service{
ServiceName: "ifconfig.me", ServiceName: "ifconfig.me",
Url: "https://ifconfig.me/ip", Url: "https://ifconfig.me/ip",
}) })
Provide(&basic_http.Service{ Provide(&httpres.Service{
ServiceName: "ip.me", ServiceName: "ip.me",
Url: "https://ip.me", Url: "https://ip.me",
Headers: http.Header{ Headers: http.Header{
@ -41,12 +41,12 @@ func init() {
}, },
}) })
Provide(&basic_http.Service{ Provide(&httpres.Service{
ServiceName: "ipecho", ServiceName: "ipecho",
Url: "http://ipecho.net/plain", Url: "http://ipecho.net/plain",
}) })
Provide(&basic_http.Service{ Provide(&httpres.Service{
ServiceName: "icanhazip", ServiceName: "icanhazip",
Url: "https://icanhazip.com", Url: "https://icanhazip.com",
}) })