Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SpectoLabs/hoverfly
/ IsLocal
Function
IsLocal
hoverctl/wrapper/hoverfly.go:141–143 ·
view source on GitHub ↗
(url string)
Source
from the content-addressed store, hash-verified
139
}
140
141
func
IsLocal(url string) bool {
142
return
strings.Contains(url,
"localhost"
) || strings.Contains(url,
"127.0.0.1"
)
143
}
144
145
/*
146
This isn't working as intended, its working, just not how I imagined it.
Callers
7
stop.go
File · 0.92
start.go
File · 0.92
Test_isLocal_WhenLocalhost
Function · 0.85
Test_isLocal_WhenLocalhost_WithHttp
Function · 0.85
Test_isLocal_WhenLocalhostIP
Function · 0.85
Test_isLocal_WhenLocalhostIP_WithHttp
Function · 0.85
Test_isLocal_WhenAnotherDNS
Function · 0.85
Calls
1
Contains
Method · 0.80
Tested by
5
Test_isLocal_WhenLocalhost
Function · 0.68
Test_isLocal_WhenLocalhost_WithHttp
Function · 0.68
Test_isLocal_WhenLocalhostIP
Function · 0.68
Test_isLocal_WhenLocalhostIP_WithHttp
Function · 0.68
Test_isLocal_WhenAnotherDNS
Function · 0.68