Fix codestyle
This commit is contained in:
1 parent
bba06321c8
commit
50ce18d201
1 file changed
+4
-3
@@ -28,10 +28,11 @@ private fun interface HostMapBuilder {
|
||||
|
||||
private fun HostsMap.hosts(vararg hosts: String, builder: HostMapBuilder.() -> Unit) = apply {
|
||||
hosts.forEach { host ->
|
||||
val list = mutableListOf<InetAddress>()
|
||||
fun String.toInetAddress() = InetAddress.getByName(this).let { InetAddress.getByAddress(host, it.address) }
|
||||
HostMapBuilder { if (!(Settings.dF && it)) list.add(toInetAddress()) }.apply(builder)
|
||||
put(host, list)
|
||||
mutableListOf<InetAddress>().apply {
|
||||
HostMapBuilder { if (!(Settings.dF && it)) add(toInetAddress()) }.apply(builder)
|
||||
put(host, this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user