Skip to content

Commit

Permalink
docs: fix code example (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuowang authored Apr 2, 2022
1 parent 2034770 commit fa03bcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func main() {
// Get a list of your domains
domains, _, _ := client.Domains.List()
for _, domain := range domains {
fmt.Printf("Domain: %s (id: %d)\n", domain.Name, domain.ID)
fmt.Printf("Domain: %s (id: %s)\n", domain.Name, domain.ID)
}

// Get a list of your domains (with error management)
Expand All @@ -40,13 +40,13 @@ func main() {
log.Fatalln(err)
}
for _, domain := range domains {
fmt.Printf("Domain: %s (id: %d)\n", domain.Name, domain.ID)
fmt.Printf("Domain: %s (id: %s)\n", domain.Name, domain.ID)
}

// Create a new Domain
newDomain := dnspod.Domain{Name: "example.com"}
domain, _, _ := client.Domains.Create(newDomain)
fmt.Printf("Domain: %s\n (id: %d)", domain.Name, domain.ID)
fmt.Printf("Domain: %s\n (id: %s)", domain.Name, domain.ID)
}
```

Expand Down

0 comments on commit fa03bcc

Please sign in to comment.