优化DNSPod和Alidns相关代码

This commit is contained in:
GoEdgeLab
2022-10-20 18:06:27 +08:00
parent 0dc5478bc6
commit 5fc0cd688b
14 changed files with 202 additions and 74 deletions

View File

@@ -0,0 +1,18 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package dnspod
type BaseResponse struct {
Status struct {
Code string `json:"code"`
Message string `json:"message"`
} `json:"status"`
}
func (this *BaseResponse) IsOk() bool {
return this.Status.Code == "1"
}
func (this *BaseResponse) LastError() (code string, message string) {
return this.Status.Code, this.Status.Message
}