Skip to content

Commit

Permalink
add TTL parse
Browse files Browse the repository at this point in the history
  • Loading branch information
jicjoy committed Oct 30, 2024
1 parent 765f02d commit a09acef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
)

func parseTTL(record *libdns.Record) {
//ttl := int32(record.TTL.Seconds())
record.TTL = time.Duration(300)* time.Second

ttl := int32(record.TTL.Seconds())
if ttl == 0 {
record.TTL = time.Duration(300)* time.Second
}

}

func SolveRecordValue(rType string,value string) []string {
Expand Down

0 comments on commit a09acef

Please sign in to comment.