Exemple #1
0
func main() {
	color := flag.Bool("color", false, "enable color")
	flag.Parse()

	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		fmt.Println(vtclean.Clean(scanner.Text(), *color))
	}
}
Exemple #2
0
func (p *proc) logline(line []byte) {
	sline := vtclean.Clean(string(line), true)
	sline = strings.Replace(sline, "\n", "\\n", -1)
	p.Logger.Printf("[%d] %s", p.Pid, sline)
}