mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-26 10:38:40 +08:00
cleanups
This commit is contained in:
parent
8bd78a65fc
commit
a93e4b60df
2 changed files with 7 additions and 7 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue