Skip to content

Commit

Permalink
chore: fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
namcxn committed Dec 12, 2024
1 parent 463edff commit e61450d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/cafe/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,18 @@ func main() {
if len(deleting) > 0 {
fmt.Printf("Those records will be deleted:\n")

fmt.Printf("%-20s%-8s%-6s%-35s%-20s%s\n", "ZONE", "TYPE", "TTL", "NAME", "CONTENT", "PROXY")
fmt.Printf("%-20s%-8s%-6s%-40s%-20s%s\n", "ZONE", "TYPE", "TTL", "NAME", "CONTENT", "PROXY")
for _, record := range deleting {
fmt.Printf("%-20s%-8s%-6d%-35s%-20s%v\n", getZoneName(record), record.Type, record.TTL, record.Name, record.Content, *record.Proxied)
fmt.Printf("%-20s%-8s%-6d%-40s%-20s%v\n", getZoneName(record), record.Type, record.TTL, record.Name, record.Content, *record.Proxied)
}
}

if len(adding) > 0 {
fmt.Printf("\nThose records will be created:\n")

fmt.Printf("%-20s%-8s%-6s%-35s%s%s\n", "ZONE", "TYPE", "TTL", "NAME", "CONTENT", "PROXY")
fmt.Printf("%-20s%-8s%-6s%-40s%-20s%s\n", "ZONE", "TYPE", "TTL", "NAME", "CONTENT", "PROXY")
for _, record := range adding {
fmt.Printf("%-20s%-8s%-6d%-35s%-20s%v\n", getZoneName(record), record.Type, record.TTL, record.Name, record.Content, *record.Proxied)
fmt.Printf("%-20s%-8s%-6d%-40s%-20s%v\n", getZoneName(record), record.Type, record.TTL, record.Name, record.Content, *record.Proxied)
}
}

Expand All @@ -167,15 +167,15 @@ func main() {
}

for _, record := range deleting {
fmt.Printf("deleting %-20s%-8s%-6d%-35s%s...\n", getZoneName(record), record.Type, record.TTL, record.Name, record.Content)
fmt.Printf("deleting %-20s%-8s%-6d%-40s%s...\n", getZoneName(record), record.Type, record.TTL, record.Name, record.Content)
err := api.DeleteDNSRecord(ctx, cloudflare.ZoneIdentifier(zoneIds[getZoneName(record)]), record.ID)
if err != nil {
log.Fatal(err)
}
}

for _, record := range adding {
fmt.Printf("creating %-20s%-8s%-6d%-35s%s... ", getZoneName(record), record.Type, record.TTL, record.Name, record.Content)
fmt.Printf("creating %-20s%-8s%-6d%-40s%s... ", getZoneName(record), record.Type, record.TTL, record.Name, record.Content)

res, err := api.CreateDNSRecord(ctx, cloudflare.ZoneIdentifier(zoneIds[getZoneName(record)]), cloudflare.CreateDNSRecordParams{
Type: record.Type,
Expand Down

0 comments on commit e61450d

Please sign in to comment.