Skip to content

Commit

Permalink
Close chan
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Jul 16, 2019
1 parent 2399f19 commit 18b6263
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions painter/painter.go
Expand Up @@ -67,6 +67,7 @@ func (p *Painter) AddColor(ctx context.Context, inn io.Reader) <-chan string {
rLen := len(p.replaces)

go func() {
defer close(p.out)
L:
for {
s, err := in.ReadString('\n')
Expand Down

0 comments on commit 18b6263

Please sign in to comment.