From 7bdeab1b2f54b22e7840b601b2d90188f6ee8ae0 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 7 May 2015 11:49:49 -0700 Subject: [PATCH] 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 --- src/text/template/parse/lex.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/text/template/parse/lex.go b/src/text/template/parse/lex.go index 762d085e685310..8f9fe1d4d8e481 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 { } }