Skip to content

Commit

Permalink
cosmetic: declare error channels together
Browse files Browse the repository at this point in the history
  • Loading branch information
wkhere committed Nov 17, 2024
1 parent 1aa8a34 commit 18c89d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func Parse(input []byte, name string, opts ...Option) (*Prog, error) {
func ParseFile(f FileInput, opts ...Option) (prog *Prog, _ error) {
inpc := make(chan string)
rerr := make(chan error)
perr := make(chan error)
done := make(chan struct{})

go func() {
Expand Down Expand Up @@ -75,8 +76,6 @@ func ParseFile(f FileInput, opts ...Option) (prog *Prog, _ error) {
close(inpc)
}()

perr := make(chan error)

go func() {
p, err := parseWithOpts(inpc, f.Name(), opts)
if err != nil {
Expand Down

0 comments on commit 18c89d1

Please sign in to comment.