示例#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))
	}
}
示例#2
0
文件: proc.go 项目: lunixbochs/yoink
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)
}