internal/frontend: fix breadcrumb for stdlib

The breadcrumb for stdlib packages now correctly links to the actual
requested version (i.e. the Go tag).

Change-Id: Icbc1ffdf474012c6cf1db963df809018602a1da1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259208
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
diff --git a/internal/frontend/unit.go b/internal/frontend/unit.go
index 67161d3..432a00d 100644
--- a/internal/frontend/unit.go
+++ b/internal/frontend/unit.go
@@ -328,7 +328,13 @@
 // displayBreadcrumbs appends additional breadcrumb links for display
 // to those for the given unit.
 func displayBreadcrumb(unit *internal.Unit, requestedVersion string) breadcrumb {
-	bc := breadcrumbPath(unit.Path, unit.ModulePath, requestedVersion)
+	v := requestedVersion
+	if unit.ModulePath == stdlib.ModulePath {
+		// TODO: Fix definition of requestedVersion, so that the
+		// requestedVersion is the goTag, not the resolved semantic version.
+		v = goTagForVersion(requestedVersion)
+	}
+	bc := breadcrumbPath(unit.Path, unit.ModulePath, v)
 	if unit.ModulePath == stdlib.ModulePath && unit.Path != stdlib.ModulePath {
 		bc.Links = append([]link{{Href: "/std", Body: "Standard library"}}, bc.Links...)
 	}