Fix default case handling in walkChild
A refreshed understanding has been etched in commentary.
This commit is contained in:
parent
a8aa579c7f
commit
6a90da394f
|
@ -2,7 +2,6 @@ package stick_test
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
|
3
exec.go
3
exec.go
|
@ -344,7 +344,8 @@ func (s *state) walkChild(node parse.Node) error {
|
|||
case *parse.UseNode:
|
||||
return s.walkUseNode(node)
|
||||
default:
|
||||
return fmt.Errorf("walkChild: unsupported Node type: %T (bug?)", node)
|
||||
// No need to handle other nodes. This function only populates blocks from a
|
||||
// referenced template (in a use statement) and does not actually execute anything.
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Reference in a new issue