Commit cbaf7ca0 authored by Robert Griesemer's avatar Robert Griesemer

godoc: remove dead code

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5698044
parent bcc38625
......@@ -15,7 +15,6 @@ import (
"os"
"path/filepath"
"strings"
"unicode"
)
type Directory struct {
......@@ -44,41 +43,6 @@ func isPkgDir(fi os.FileInfo) bool {
name[0] != '_' && name[0] != '.' // ignore _files and .files
}
func firstSentence(s string) string {
i := -1 // index+1 of first terminator (punctuation ending a sentence)
j := -1 // index+1 of first terminator followed by white space
prev := 'A'
for k, ch := range s {
k1 := k + 1
if ch == '.' || ch == '!' || ch == '?' {
if i < 0 {
i = k1 // first terminator
}
if k1 < len(s) && s[k1] <= ' ' {
if j < 0 {
j = k1 // first terminator followed by white space
}
if !unicode.IsUpper(prev) {
j = k1
break
}
}
}
prev = ch
}
if j < 0 {
// use the next best terminator
j = i
if j < 0 {
// no terminator at all, use the entire string
j = len(s)
}
}
return s[0:j]
}
type treeBuilder struct {
pathFilter func(string) bool
maxDepth int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment