зеркало из https://github.com/golang/build.git
app/appengine: delete unused tail func
It's the only func not used by the template. Looking at the git history, I don't see it ever being used. Change-Id: Id074712996589fc3a7a517fd7ae47bc84a292904 Reviewed-on: https://go-review.googlesource.com/c/build/+/211317 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Родитель
20e40ba7b0
Коммит
41fffb13b6
|
@ -799,7 +799,6 @@ var tmplFuncs = template.FuncMap{
|
|||
"shortDesc": shortDesc,
|
||||
"shortHash": shortHash,
|
||||
"shortUser": shortUser,
|
||||
"tail": tail,
|
||||
"unsupported": unsupported,
|
||||
"isUntested": isUntested,
|
||||
"formatTime": formatTime,
|
||||
|
@ -913,15 +912,6 @@ func shortUser(user string) string {
|
|||
return user
|
||||
}
|
||||
|
||||
// tail returns the trailing n lines of s.
|
||||
func tail(n int, s string) string {
|
||||
lines := strings.Split(s, "\n")
|
||||
if len(lines) < n {
|
||||
return s
|
||||
}
|
||||
return strings.Join(lines[len(lines)-n:], "\n")
|
||||
}
|
||||
|
||||
// templateFile returns the path to the provided HTML template file,
|
||||
// conditionally prepending a relative path depending on the
|
||||
// environment.
|
||||
|
|
Загрузка…
Ссылка в новой задаче