mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
A small fix for offline server tests
This commit is contained in:
parent
26ef396959
commit
1a9102706b
|
@ -76,7 +76,7 @@ func (s *Server) Hostname() (hostname string) {
|
||||||
} else {
|
} else {
|
||||||
fullhost := s.Config.ListeningAddr
|
fullhost := s.Config.ListeningAddr
|
||||||
if idx := strings.IndexByte(fullhost, ':'); idx > 1 { // at least after second char
|
if idx := strings.IndexByte(fullhost, ':'); idx > 1 { // at least after second char
|
||||||
hostname = hostname[0 : idx-1]
|
hostname = hostname[0:idx]
|
||||||
} else {
|
} else {
|
||||||
hostname = "0.0.0.0"
|
hostname = "0.0.0.0"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user