-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TTL and TXT #4
base: master
Are you sure you want to change the base?
Conversation
@@ -3,8 +3,9 @@ package main | |||
import ( | |||
"context" | |||
"fmt" | |||
|
|||
"github.com/libdns/huaweicloud" | |||
"time" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls run gofmt
to fix lint.
@@ -1,4 +1,4 @@ | |||
module github.com/libdns/huaweicloud | |||
module github.com/jicjoy/huaweicloud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not change module name.
//ttl | ||
parseTTL(&record) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix lint.
ttl := int32(record.TTL.Seconds()) | ||
request := &model.CreateRecordSetRequest{ | ||
ZoneId: zoneId, | ||
Body: &model.CreateRecordSetRequestBody{ | ||
Name: libdns.AbsoluteName(record.Name, zone), | ||
Type: record.Type, | ||
Ttl: &ttl, | ||
Records: []string{record.Value}, | ||
Records: SolveRecordValue(record.Type,record.Value), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix lint.
//parse ttl | ||
//parseTTL(&record) | ||
record.TTL = time.Duration(300)* time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix lint.
"github.com/libdns/libdns" | ||
"time" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix lint.
ret, err := p.SetRecords(context.TODO(), "iitmall.com",[]libdns.Record{ | ||
{ | ||
Type: "TXT", | ||
Name: "es", | ||
Value: "ssssfsdfsdf", | ||
TTL: time.Duration(10)* time.Second, | ||
}, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this.
Closes #1