mirror of
https://github.com/golang/go
synced 2024-11-05 11:36:10 -07:00
997b3545fd
The optional Qualifier function determines what prefix to attach to package-level names, enabling clients to qualify packages in different ways, for example, using only the package name instead of its complete path, or using the locally appropriate name for package given a set of (possibly renaming) imports. Prior to this change, clients wanting this behavior had to copy hundreds of lines of complex printing logic. Fun fact: (*types.Package).Path and (*types.Package).Name are valid Qualifier functions. We provide the RelativeTo helper function to create Qualifiers so that the old behavior remains a one-liner. Fixes golang/go#11133 Change-Id: Ibd63f639c7b3aa1738826d6165f2d810efeb8293 Reviewed-on: https://go-review.googlesource.com/11692 Reviewed-by: Robert Griesemer <gri@golang.org> |
||
---|---|---|
.. | ||
analysis | ||
redirect | ||
static | ||
util | ||
vfs | ||
cmdline_test.go | ||
cmdline.go | ||
corpus.go | ||
dirtrees.go | ||
format.go | ||
godoc_test.go | ||
godoc.go | ||
index_test.go | ||
index.go | ||
linkify.go | ||
meta.go | ||
page.go | ||
parser.go | ||
pres.go | ||
search.go | ||
server_test.go | ||
server.go | ||
snippet.go | ||
spec.go | ||
spot.go | ||
tab.go | ||
template.go |