introduce OnOff helper, for consistency in status output
This commit is contained in:
1 parent
1c14660ed5
commit
c10f1dacad
3 files changed
+12
-15
No files matched your search
+2
-10
@@ -119,16 +119,8 @@ func (proxy *Proxy) Status() string {
|
||||
default:
|
||||
fmt.Fprintln(&buf, "TLS off")
|
||||
}
|
||||
if proxy.WithDNS {
|
||||
fmt.Fprintln(&buf, "DNS on")
|
||||
} else {
|
||||
fmt.Fprintln(&buf, "DNS off")
|
||||
}
|
||||
if proxy.WithIPAM {
|
||||
fmt.Fprintln(&buf, "IPAM on")
|
||||
} else {
|
||||
fmt.Fprintln(&buf, "IPAM off")
|
||||
}
|
||||
fmt.Fprintln(&buf, "DNS", OnOff(proxy.WithDNS))
|
||||
fmt.Fprintln(&buf, "IPAM", OnOff(proxy.WithIPAM))
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user