Skip to content

Commit

Permalink
handle with linter
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Jun 10, 2024
1 parent ecaed46 commit 4b193f6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions repl/repl.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,19 @@ func Start(in io.Reader, out io.Writer) {
continue
}

io.WriteString(out, program.String())
io.WriteString(out, "\n")
if _, err := io.WriteString(out, program.String()); err != nil {
return
}
if _, err := io.WriteString(out, "\n"); err != nil {
return
}
}
}

func printParserErrors(out io.Writer, errors []string) {
for _, msg := range errors {
io.WriteString(out, "\t"+msg+"\n")
if _, err := io.WriteString(out, "\t"+msg+"\n"); err != nil {
return
}
}
}

0 comments on commit 4b193f6

Please sign in to comment.