Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Fix TTL and TXT #4

wants to merge 9 commits into from

Conversation

jicjoy
Copy link

@jicjoy jicjoy commented Oct 31, 2024

Closes #1

@@ -3,8 +3,9 @@ package main
import (
"context"
"fmt"

"github.com/libdns/huaweicloud"
"time"
Copy link
Collaborator

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
Copy link
Collaborator

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.

Comment on lines +70 to +71
//ttl
parseTTL(&record)
Copy link
Collaborator

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),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix lint.

Comment on lines +107 to +109
//parse ttl
//parseTTL(&record)
record.TTL = time.Duration(300)* time.Second
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix lint.

Comment on lines +4 to +5
"github.com/libdns/libdns"
"time"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix lint.

Comment on lines +17 to +24
ret, err := p.SetRecords(context.TODO(), "iitmall.com",[]libdns.Record{
{
Type: "TXT",
Name: "es",
Value: "ssssfsdfsdf",
TTL: time.Duration(10)* time.Second,
},
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add txt record Error TXT records missing starting quotation mark
2 participants