Just do host?:""
instead of calling a function
, code coverage can be ignored on library functions, but if you want to cover most of it do below
fun getHostName(url: String): String{
val uri = Uri.parse(url)
return uri.host?:""
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…