diff --git a/src/text/template/parse/lex.go b/src/text/template/parse/lex.go index 762d085e68..8f9fe1d4d8 100644 --- a/src/text/template/parse/lex.go +++ b/src/text/template/parse/lex.go @@ -177,9 +177,6 @@ func (l *lexer) nextItem() item { // drain drains the output so the lexing goroutine will exit. // Called by the parser, not in the lexing goroutine. func (l *lexer) drain() { - if l == nil { - return - } for range l.items { } }