mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-03-23 19:41:50 +00:00
ddns: store configuation in database (#435)
* ddns: store configuation in database Co-authored-by: nap0o <144927971+nap0o@users.noreply.github.com> * feat: split domain with soa lookup * switch to libdns interface * ddns: add unit test * ddns: skip TestSplitDomainSOA on ci network is not steady * fix error handling * fix error handling --------- Co-authored-by: nap0o <144927971+nap0o@users.noreply.github.com>
This commit is contained in:
@@ -21,6 +21,10 @@ func GjsonGet(json []byte, path string) (gjson.Result, error) {
|
||||
}
|
||||
|
||||
func GjsonParseStringMap(jsonObject string) (map[string]string, error) {
|
||||
if jsonObject == "" {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
result := gjson.Parse(jsonObject)
|
||||
if !result.IsObject() {
|
||||
return nil, ErrGjsonWrongType
|
||||
|
||||
Reference in New Issue
Block a user