Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
tour: use names instead of numbers for page urls #13917
The current system of using paths like /moretypes/12 is problematic. One is that such URLs are not descriptive. The other is that the numbers change whenever we add or remove a page, breaking existing links. (I have two recent CLs that completely renumber the methods section.)
We should change the URLs to use names instead of numbers. For instance, the URL http://tour.golang.org/methods/4 could be http://tour.golang.org/methods/pointer-receivers instead. This adds a new requirement that all pages within a sub-tour must have a unique name, but I think the existing content meets that requirement already, and I don't think it's an onerous burden for future material.
@campoy - how hard would it be to do this? Looking at the code, I'm not sure how to make the change cleanly.
Agreed, having permanent links is worth the hassle of choosing a unique id.
Also, please take into account this extra mapping that we already did from the previous versions to the current one in https://github.com/golang/tour/blob/master/static/js/values.js#L93