]> Cypherpunks repositories - gostls13.git/commitdiff
text/template: delete obsolete nil check
authorRob Pike <r@golang.org>
Thu, 7 May 2015 18:49:49 +0000 (11:49 -0700)
committerRob Pike <r@golang.org>
Thu, 7 May 2015 20:13:14 +0000 (20:13 +0000)
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 <bradfitz@golang.org>
src/text/template/parse/lex.go

index 762d085e685310e2ddc903c7d4a22da1a7be730b..8f9fe1d4d8e48123604a23585a96ac6d5816db5b 100644 (file)
@@ -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 {
        }
 }