From: Rob Pike Date: Thu, 7 May 2015 18:49:49 +0000 (-0700) Subject: text/template: delete obsolete nil check X-Git-Tag: go1.5beta1~682 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7bdeab1b2f54b22e7840b601b2d90188f6ee8ae0;p=gostls13.git text/template: delete obsolete nil check This was added during testing but is unnecessary. Thanks to gravis on GitHub for catching it. See #10574. Change-Id: I4a8f76d237e67f5a0ea189a0f3cadddbf426778a Reviewed-on: https://go-review.googlesource.com/9841 Reviewed-by: Brad Fitzpatrick --- 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 { } }