mirror of
https://gitlab.com/pnx-tools/dns-updater.git
synced 2026-06-16 05:54:56 +02:00
ip/resolver/manager.go: make jsonip be a basic_http service with jsonipDecoder decoder function.
This commit is contained in:
parent
42d5d57314
commit
6c696ced3d
1 changed files with 5 additions and 2 deletions
|
|
@ -4,7 +4,6 @@ import (
|
|||
"net/http"
|
||||
|
||||
"dnsupdater/ip/resolver/basic_http"
|
||||
"dnsupdater/ip/resolver/jsonip"
|
||||
)
|
||||
|
||||
var services []Service
|
||||
|
|
@ -23,7 +22,11 @@ func Get(name string) Service {
|
|||
}
|
||||
|
||||
func init() {
|
||||
Provide(jsonip.New())
|
||||
Provide(&basic_http.Service{
|
||||
ServiceName: "jsonip",
|
||||
Url: "https://jsonip.com",
|
||||
Decoder: JsonipDecoder,
|
||||
})
|
||||
|
||||
Provide(&basic_http.Service{
|
||||
ServiceName: "ifconfig.me",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue