logic invert
This commit is contained in:
parent
f89d79f69d
commit
c6d6536e49
1 changed files with 8 additions and 6 deletions
|
@ -84,7 +84,10 @@ func Walk(c interface{}, v func(interface{}) bool) {
|
||||||
if !v(c) {
|
if !v(c) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if sc, ok := c.(Scanner); ok {
|
sc, ok := c.(Scanner)
|
||||||
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
for _, c := range sc.Scan() {
|
for _, c := range sc.Scan() {
|
||||||
if !v(c) {
|
if !v(c) {
|
||||||
return
|
return
|
||||||
|
@ -92,7 +95,6 @@ func Walk(c interface{}, v func(interface{}) bool) {
|
||||||
Walk(c, v)
|
Walk(c, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// PrepareToRun builds the component database (using Walk) and then calls
|
// PrepareToRun builds the component database (using Walk) and then calls
|
||||||
// Prepare on every Preparer. You must call PrepareToRun before passing to
|
// Prepare on every Preparer. You must call PrepareToRun before passing to
|
||||||
|
|
Loading…
Reference in a new issue