I am using a Go function which roughly works as follows:
- It traverses the given URL and searches for a string
- For traversing the websites I have used Chrome DevTools package.
My problem is while it's doing the traversal, it logs some error messages like
ERROR: encountered exception 'Uncaught' (287:57)
etc.
I have to suppress this error printing in the console. I have checked chrome-dp issues and I think it's a known issue, Reference: https://github.com/chromedp/chromedp/issues/374#issuecomment-498015901
How can I avoid this printing directly into the console?
You cannot from Go code. You can filter the output and remove these after wards. e.g. with grep.