Merge pull request #3818 from shizhMSFT/fix_ref

Fix panic on reference.Spec.Hostname()
This commit is contained in:
Michael Crosby 2019-11-11 08:01:23 -05:00 committed by GitHub
commit 08d4231f57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]
} }