Fix panic on reference.Spec.Hostname()
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
This commit is contained in:
parent
d1bcb4beea
commit
5bf2c6fc25
@ -124,7 +124,7 @@ func (r Spec) Hostname() string {
|
||||
i := strings.Index(r.Locator, "/")
|
||||
|
||||
if i < 0 {
|
||||
i = len(r.Locator) + 1
|
||||
return r.Locator
|
||||
}
|
||||
return r.Locator[:i]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user