Copyright 2019 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package frontend

import (
	
	
	

	
	
	
)
handlePackageDetailsRedirect redirects all redirects to "/pkg" to "/".
handleModuleDetailsRedirect redirects all redirects to "/mod" to "/".
stdlibPathForShortcut returns a path in the stdlib that shortcut should redirect to, or the empty string if there is no such path.
func ( context.Context,  *postgres.DB,  string) ( string,  error) {
	defer derrors.Wrap(&, "stdlibPathForShortcut(ctx, %q)", )
	if !stdlib.Contains() {
		return "", nil
	}
	,  := .GetStdlibPathsWithSuffix(, )
	if  != nil {
		return "", 
	}
	if len() == 1 {
		return [0], nil
No matches, or ambiguous.
	return "", nil