diff --git a/alidns/AddDomain.go b/alidns/AddDomain.go index 2383865..7b589b2 100644 --- a/alidns/AddDomain.go +++ b/alidns/AddDomain.go @@ -9,7 +9,7 @@ import ( type AddDomainArgs struct { DomainName string - //optional + // optional GroupId string } diff --git a/alidns/AddDomainRecord.go b/alidns/AddDomainRecord.go index 92c8e17..4cdefd2 100644 --- a/alidns/AddDomainRecord.go +++ b/alidns/AddDomainRecord.go @@ -13,7 +13,7 @@ type AddDomainRecordArgs struct { Type string Value string - //optional + // optional TTL json.Number Line string } diff --git a/alidns/DeleteSubDomainRecords.go b/alidns/DeleteSubDomainRecords.go index 4ff4c05..9d22a5a 100644 --- a/alidns/DeleteSubDomainRecords.go +++ b/alidns/DeleteSubDomainRecords.go @@ -6,7 +6,7 @@ type DeleteSubDomainRecordsArgs struct { DomainName string RR string - //optional + // optional Type string } diff --git a/alidns/DescribeDomainGroups.go b/alidns/DescribeDomainGroups.go index 797b354..62852e9 100644 --- a/alidns/DescribeDomainGroups.go +++ b/alidns/DescribeDomainGroups.go @@ -12,7 +12,7 @@ type DomainGroupType struct { } type DescribeDomainGroupsArgs struct { - //optional + // optional common.Pagination KeyWord string } @@ -32,7 +32,6 @@ func (client *Client) DescribeDomainGroups(args *DescribeDomainGroupsArgs) (grou action := "DescribeDomainGroups" response := &DescribeDomainGroupsResponse{} err = client.Invoke(action, args, response) - if err != nil { log.Printf("%s error, %v", action, err) return nil, err diff --git a/alidns/DescribeDomainInfo.go b/alidns/DescribeDomainInfo.go index b88cd91..5945031 100644 --- a/alidns/DescribeDomainInfo.go +++ b/alidns/DescribeDomainInfo.go @@ -36,7 +36,6 @@ func (client *Client) DescribeDomainInfo(args *DescribeDomainInfoArgs) (domain D action := "DescribeDomainInfo" response := &DescribeDomainInfoResponse{} err = client.Invoke(action, args, response) - if err != nil { log.Printf("%s error, %v", action, err) return DomainType{}, err diff --git a/alidns/DescribeDomainRecords.go b/alidns/DescribeDomainRecords.go index 81c97db..a95e538 100644 --- a/alidns/DescribeDomainRecords.go +++ b/alidns/DescribeDomainRecords.go @@ -5,7 +5,7 @@ import "github.com/denverdino/aliyungo/common" type DescribeDomainRecordsArgs struct { DomainName string - //optional + // optional common.Pagination RRKeyWord string TypeKeyWord string diff --git a/alidns/DescribeDomainRecordsNew.go b/alidns/DescribeDomainRecordsNew.go index f2f04d3..0d31cac 100644 --- a/alidns/DescribeDomainRecordsNew.go +++ b/alidns/DescribeDomainRecordsNew.go @@ -5,7 +5,7 @@ import "github.com/denverdino/aliyungo/common" type DescribeDomainRecordsNewArgs struct { DomainName string - //optional + // optional common.Pagination RRKeyWord string TypeKeyWord string diff --git a/alidns/DescribeDomains.go b/alidns/DescribeDomains.go index 41e1232..8032eae 100644 --- a/alidns/DescribeDomains.go +++ b/alidns/DescribeDomains.go @@ -28,7 +28,6 @@ func (client *Client) DescribeDomains(args *DescribeDomainsArgs) (domains []Doma action := "DescribeDomains" response := &DescribeDomainsResponse{} err = client.Invoke(action, args, response) - if err != nil { log.Printf("%s error, %v", action, err) return nil, err diff --git a/alidns/DescribeSubDomainRecords.go b/alidns/DescribeSubDomainRecords.go index 86a8e4d..cc46728 100644 --- a/alidns/DescribeSubDomainRecords.go +++ b/alidns/DescribeSubDomainRecords.go @@ -5,7 +5,7 @@ import "github.com/denverdino/aliyungo/common" type DescribeSubDomainRecordsArgs struct { SubDomain string - //optional + // optional PageNumber int32 PageSize int32 Type string diff --git a/alidns/UpdateDomainRecord.go b/alidns/UpdateDomainRecord.go index 4d40100..51fb53d 100644 --- a/alidns/UpdateDomainRecord.go +++ b/alidns/UpdateDomainRecord.go @@ -12,7 +12,7 @@ type UpdateDomainRecordArgs struct { Type string Value string - //optional + // optional TTL json.Number Priority json.Number Line string diff --git a/main.go b/main.go index 2971a27..0fd4fef 100644 --- a/main.go +++ b/main.go @@ -15,11 +15,12 @@ import ( "time" "github.com/denverdino/aliyungo/common" - dns "github.com/honwen/aliyun-ddns-cli/alidns" "github.com/honwen/golibs/cip" "github.com/honwen/golibs/domain" "github.com/honwen/ip2loc" "github.com/urfave/cli" + + dns "github.com/honwen/aliyun-ddns-cli/alidns" ) const RR_AT = `@` diff --git a/utils_test.go b/utils_test.go index 0bf68bc..e36541c 100644 --- a/utils_test.go +++ b/utils_test.go @@ -67,6 +67,7 @@ func TestSplitDomain005(t *testing.T) { got.T(t).Eq(rr, "*.b.a") got.T(t).Eq(domain, "example.com") } + func TestSplitDomain006(t *testing.T) { rr, domain := domain.SplitDomainToRR("a.example.co.kr")