From 7233c4d768c615a031d5b5dce84b74e58f08ef56 Mon Sep 17 00:00:00 2001 From: tobi Date: Tue, 7 Jan 2025 17:49:02 +0100 Subject: [PATCH] move obfuscate parse nearer to where err is checked --- internal/subscriptions/domainperms.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/subscriptions/domainperms.go b/internal/subscriptions/domainperms.go index b2fe004fb..df48fea41 100644 --- a/internal/subscriptions/domainperms.go +++ b/internal/subscriptions/domainperms.go @@ -581,10 +581,10 @@ func (s *Subscriptions) permsFromCSV( } var ( - domainRaw = record[0] - severity = record[1] - publicComment = record[4] - obfuscate, err = strconv.ParseBool(record[5]) + domainRaw = record[0] + severity = record[1] + publicComment = record[4] + obfuscateStr = record[5] ) if severity != "suspend" { @@ -592,6 +592,7 @@ func (s *Subscriptions) permsFromCSV( continue } + obfuscate, err := strconv.ParseBool(obfuscateStr) if err != nil { l.Warnf("couldn't parse obfuscate field of record: %+v", record) continue