From 6c696ced3dffe4d5df00426e26be3ea948fea266 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 25 Dec 2023 21:30:53 +0100 Subject: [PATCH] ip/resolver/manager.go: make jsonip be a basic_http service with jsonipDecoder decoder function. --- ip/resolver/manager.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ip/resolver/manager.go b/ip/resolver/manager.go index 1b5f3c9..4bef103 100644 --- a/ip/resolver/manager.go +++ b/ip/resolver/manager.go @@ -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",