Merge pull request #3818 from shizhMSFT/fix_ref
Fix panic on reference.Spec.Hostname()
This commit is contained in:
commit
08d4231f57
@ -124,7 +124,7 @@ func (r Spec) Hostname() string {
|
|||||||
i := strings.Index(r.Locator, "/")
|
i := strings.Index(r.Locator, "/")
|
||||||
|
|
||||||
if i < 0 {
|
if i < 0 {
|
||||||
i = len(r.Locator) + 1
|
return r.Locator
|
||||||
}
|
}
|
||||||
return r.Locator[:i]
|
return r.Locator[:i]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user