mirror of
https://github.com/coredns/coredns.git
synced 2025-11-15 16:32:23 -05:00
all: gometalinter (#843)
* kubernetes/reverse: remove deadcode * deadcode in errors and kubernetes removed * unnecessary conversion * constants * proxy: time.Since() * simplications * static check * Disable test/external_test
This commit is contained in:
@@ -74,25 +74,6 @@ func (network *network) ipToHostname(ip net.IP) (name string) {
|
||||
return strings.Replace(network.Template, templateNameIP, name, 1)
|
||||
}
|
||||
|
||||
// just the same from net.ip package, but with uint8
|
||||
func uitoa(val uint8) string {
|
||||
if val == 0 {
|
||||
// avoid string allocation
|
||||
return "0"
|
||||
}
|
||||
var buf [20]byte // big enough for 64bit value base 10
|
||||
i := len(buf) - 1
|
||||
for val >= 10 {
|
||||
q := val / 10
|
||||
buf[i] = byte('0' + val - q*10)
|
||||
i--
|
||||
val = q
|
||||
}
|
||||
// val < 10
|
||||
buf[i] = byte('0' + val)
|
||||
return string(buf[i:])
|
||||
}
|
||||
|
||||
type networks []network
|
||||
|
||||
func (n networks) Len() int { return len(n) }
|
||||
|
||||
Reference in New Issue
Block a user