vendredi 22 juillet 2016

Golang: Find filenames and line numbers that prints output to stdout

I inherited a codebase with tens of thousands of lines, and several libraries, that prints out several lines of garbage (both from normal functions and imported libraries, as well as from test functions and libraries) onto the console when I run a go test. This makes testing a nightmare since my print statements and errors get lost in a sea of junk.

Is there an easy way to identify and output the filenames and line numbers where any sort of printing to the console occurs, so that I can mute these suckers?

Aucun commentaire:

Enregistrer un commentaire