improve: 移除 yaml config 之外类型的支持
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
dnsUtil2 "github.com/Mmx233/BitSrunLoginGo/internal/pkg/dns/util"
|
||||
dnsUtil "github.com/Mmx233/BitSrunLoginGo/internal/pkg/dns/util"
|
||||
"github.com/Mmx233/tool"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
@@ -28,7 +28,7 @@ func New(ttl uint, conf map[string]interface{}, Http *http.Client) (*DnsProvider
|
||||
TTL: ttl,
|
||||
Http: tool.NewHttpTool(Http),
|
||||
}
|
||||
e := dnsUtil2.DecodeConfig(conf, &p)
|
||||
e := dnsUtil.DecodeConfig(conf, &p)
|
||||
if e != nil {
|
||||
return nil, e
|
||||
}
|
||||
@@ -162,7 +162,7 @@ func (a DnsProvider) NewRecord(subDomain, rootDomain, ip string) error {
|
||||
}
|
||||
|
||||
func (a DnsProvider) SetDomainRecord(domain, ip string) error {
|
||||
subDomain, rootDomain, e := dnsUtil2.DecodeDomain(domain)
|
||||
subDomain, rootDomain, e := dnsUtil.DecodeDomain(domain)
|
||||
if e != nil {
|
||||
return e
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user