1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Cleanups: Fix many issues reported by staticcheck.io (#837)

* Lint: Fix ST1005: error strings should not be capitalized

* Cleanup: Fix a lot of staticcheck.io warnings
This commit is contained in:
Tom Limoncelli
2020-08-30 20:38:08 -04:00
committed by GitHub
parent cb9a82717b
commit b6fd4dffd7
17 changed files with 19 additions and 37 deletions

View File

@@ -118,9 +118,7 @@ func (s *SPFRecord) Flatten(spec string) *SPFRecord {
// flatten child recursively
flattenedChild := p.IncludeRecord.Flatten(spec)
// include their parts (skipping final all term)
for _, childPart := range flattenedChild.Parts[:len(flattenedChild.Parts)-1] {
newRec.Parts = append(newRec.Parts, childPart)
}
newRec.Parts = append(newRec.Parts, flattenedChild.Parts[:len(flattenedChild.Parts)-1]...)
}
}
return newRec