diff options
Diffstat (limited to 'src/cmd/godoc/mapping.go')
| -rw-r--r-- | src/cmd/godoc/mapping.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/cmd/godoc/mapping.go b/src/cmd/godoc/mapping.go index 92614e83e..51f23ab98 100644 --- a/src/cmd/godoc/mapping.go +++ b/src/cmd/godoc/mapping.go @@ -15,7 +15,6 @@ import ( "strings" ) - // A Mapping object maps relative paths (e.g. from URLs) // to absolute paths (of the file system) and vice versa. // @@ -52,13 +51,11 @@ type Mapping struct { prefixes []string // lazily computed from list } - type mapping struct { prefix, path string value *RWValue } - // Init initializes the Mapping from a list of paths. // Empty paths are ignored; relative paths are assumed to be relative to // the current working directory and converted to absolute paths. @@ -93,11 +90,9 @@ func (m *Mapping) Init(paths []string) { m.list = list } - // IsEmpty returns true if there are no mappings specified. func (m *Mapping) IsEmpty() bool { return len(m.list) == 0 } - // PrefixList returns a list of all prefixes, with duplicates removed. // For instance, for the mapping: // @@ -137,7 +132,6 @@ func (m *Mapping) PrefixList() []string { return m.prefixes } - // Fprint prints the mapping. func (m *Mapping) Fprint(w io.Writer) { for _, e := range m.list { @@ -145,7 +139,6 @@ func (m *Mapping) Fprint(w io.Writer) { } } - func splitFirst(path string) (head, tail string) { i := strings.Index(path, string(filepath.Separator)) if i > 0 { @@ -155,7 +148,6 @@ func splitFirst(path string) (head, tail string) { return "", path } - // ToAbsolute maps a slash-separated relative path to an absolute filesystem // path using the Mapping specified by the receiver. If the path cannot // be mapped, the empty string is returned. @@ -181,7 +173,6 @@ func (m *Mapping) ToAbsolute(spath string) string { return "" // no match } - // ToRelative maps an absolute filesystem path to a relative slash-separated // path using the Mapping specified by the receiver. If the path cannot // be mapped, the empty string is returned. @@ -197,7 +188,6 @@ func (m *Mapping) ToRelative(fpath string) string { return "" // no match } - // Iterate calls f for each path and RWValue in the mapping (in uspecified order) // until f returns false. // |
