mirror of https://github.com/status-im/migrate.git
Merge pull request #27 from ngauthier/proper-exit-codes
ok flag is misleading, it's really if channel is closed, so return okFlag
This commit is contained in:
commit
f12373eb83
6
main.go
6
main.go
|
@ -160,9 +160,9 @@ func writePipe(pipe chan interface{}) (ok bool) {
|
||||||
if pipe != nil {
|
if pipe != nil {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case item, ok := <-pipe:
|
case item, more := <-pipe:
|
||||||
if !ok {
|
if !more {
|
||||||
return false
|
return okFlag
|
||||||
} else {
|
} else {
|
||||||
switch item.(type) {
|
switch item.(type) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue