mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
17 lines
322 B
Go
17 lines
322 B
Go
package dns
|
|
|
|
import (
|
|
"encoding/json"
|
|
"github.com/iwind/TeaGo/maps"
|
|
)
|
|
|
|
// DecodeAPIParams 获取API参数
|
|
func (this *DNSProvider) DecodeAPIParams() (maps.Map, error) {
|
|
if len(this.ApiParams) == 0 {
|
|
return maps.Map{}, nil
|
|
}
|
|
result := maps.Map{}
|
|
err := json.Unmarshal(this.ApiParams, &result)
|
|
return result, err
|
|
}
|