This commit is contained in:
Thomas Limoncelli 2025-12-09 13:37:17 -05:00
parent 8bd78a65fc
commit a93e4b60df
No known key found for this signature in database
2 changed files with 7 additions and 7 deletions

View file

@ -182,9 +182,7 @@ func getENotationInt(x float32) (uint8, error) {
}
// Truncate the mantissa (integer value) and ensure it's within 4 bits
mantissaInt := min(int(math.Floor(mantissa)),
// Cap mantissa at 9
9)
mantissaInt := min(int(math.Floor(mantissa)), 9) // Cap mantissa at 9
// Ensure exponent is within 4 bits
if exp < 0 {

View file

@ -34,10 +34,12 @@ func parseZoneContents(content string, zoneName string, zonefileName string) (mo
func showRecs(recs models.Records) string {
var result strings.Builder
for _, rec := range recs {
result.WriteString((rec.GetLabel() +
" " + rec.Type +
" " + rec.GetTargetCombined() +
"\n"))
result.WriteString(rec.GetLabel())
result.WriteString(" ")
result.WriteString(rec.Type)
result.WriteString(" ")
result.WriteString(rec.GetTargetCombined())
result.WriteString("\n")
}
return result.String()
}