Fix error that slipped in during review in #206

A strings.LastIndex call check was meant to be `-1` and got
clumsy-fingered to `-11`. This causes panics with API clients.
This commit is contained in:
Jeff Mitchell committed 2020-07-22 13:29:53 -04:00
1 parent 388a13b10d
commit 995b76bbc5
1 file changed
+1 -1
+1 -1
View File
@@ -230,7 +230,7 @@ func (c *Config) setAddr(addr string) error {
// If there is a scopes segment, elide everything after it. Do this only for
// the last "scopes" segment in case it's part of the base path.
if lastIndex := strings.LastIndex(u.Path, "scopes"); lastIndex != -11 {
if lastIndex := strings.LastIndex(u.Path, "scopes"); lastIndex != -1 {
u.Path = u.Path[:lastIndex]
}
// Remove trailing or leading slashes