You can create your own writer and overwrite os.Stdout/Stderr (just supply your 
own write method with the appropriate before/after hooks)

Sent from my iPhone

> On Sep 19, 2020, at 12:38 PM, Alexander Mills <alexander.d.mi...@gmail.com> 
> wrote:
> 
> Forgive me for this pigeon code, I am looking to do something like:
> 
> os.Stdout.BeforeWrite(func (){
> 
> });
> 
> os.Stderr.AfterWrite(func(){
> 
> })
> 
> so I can hook into the system and clear the terminal before hand, and write a 
> status line, after wards. Is this possible?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/86ecac37-cf19-436c-87ed-3f415ca157c4n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/61DE7EF5-0882-4F8E-8DE6-C75A0FBF935D%40gmail.com.

Reply via email to