rename errorFlag to okFlag to make it even more clearer #22

This commit is contained in:
mattes 2014-12-19 12:10:32 -08:00
parent bcba31af11
commit 2cf4b2c33e
1 changed files with 5 additions and 5 deletions

10
main.go
View File

@ -155,14 +155,14 @@ func main() {
}
}
func writePipe(pipe chan interface{}) bool {
errorFlag := false
func writePipe(pipe chan interface{}) (ok bool) {
okFlag := true
if pipe != nil {
for {
select {
case item, ok := <-pipe:
if !ok {
return !errorFlag
return false
} else {
switch item.(type) {
@ -172,7 +172,7 @@ func writePipe(pipe chan interface{}) bool {
case error:
c := color.New(color.FgRed)
c.Println(item.(error).Error(), "\n")
errorFlag = true
okFlag = false
case file.File:
f := item.(file.File)
@ -192,7 +192,7 @@ func writePipe(pipe chan interface{}) bool {
}
}
}
return errorFlag
return okFlag
}
func verifyMigrationsPath(path string) {