Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Use term.Write() to write to console
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmalkmus committed Jan 2, 2017
1 parent 1b54959 commit f3b7c5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func main() {

res, err := compute.Evaluate(text)
if err != nil {
fmt.Println("Error: " + err.Error())
term.Write([]byte(fmt.Sprintln("Error: " + err.Error())))
continue
}
fmt.Printf("%s\n", strconv.FormatFloat(res, 'G', -1, 64))
term.Write([]byte(fmt.Sprintf("%s\n", strconv.FormatFloat(res, 'G', -1, 64))))
}
}

Expand Down

0 comments on commit f3b7c5e

Please sign in to comment.