Comment 1 for bug 1751287

Revision history for this message
John A Meinel (jameinel) wrote :

It seems like it would be reasonably to just look at the end of the path, rather than assuming the entire path is only the version URL.

It seems that we only strip of a trailing '/', so probably we could do:
path := strings.TrimSuffix(strings.ToLower(url.Path), "/")
_, versionNumStr := path.Split(path)
versionNumStr = strings.TrimPrefix("v")