It all works very well, but now I want to make go auto-close the window
after x seconds, rather than expecting/waiting for the end-user to close it interactively.
How can this be achieved?
I’ve tried playing around using goroutines and channels, but so far without success.
I’d be very grateful for any guidance on the matter.
From the example you shared and the docs for the package it seems all you have to do to close the window is call the Exit() function. So instead of deferring it you could try to block for however long with a wait or something and then call the Exit().
I got the idea to write it as a command and use exec.Command to run custom windows whenever you want. Here’s the repo if you would like to check it out:
Hi again, Curtis - and thanks a lot for your effort to put this together.
Although I was hoping to manage this without calling any external
component, I’ll give it a go and check if it meets the utility requirements.