From a09acef4c7939ca9f1694ba76beb5cc6054ff4a7 Mon Sep 17 00:00:00 2001 From: wei tan Date: Wed, 30 Oct 2024 20:02:47 +0800 Subject: [PATCH] add TTL parse --- utils.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils.go b/utils.go index 12f047e..d82179a 100644 --- a/utils.go +++ b/utils.go @@ -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 {