I am playing with golang and want to create a simple terminal tool (on mac, but it should work on linux too). I need to display character "x" in the center of the terminal window. How can I detect width and height of terminal window and detect its changes?
A terminal package exists in the Go crypto repository: In particular, check out the GetSize function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With