mirror of
https://github.com/mudler/luet.git
synced 2025-09-16 07:10:29 +00:00
* ⬆️ Bump to go 1.19 as requirement for building Signed-off-by: mudler <mudler@c3os.io> * ⬆️ Update vendor * 🤖 Use go 1.19 in CI * 🤖 Do not pull cover from makefile Signed-off-by: mudler <mudler@c3os.io> * 🤖 Fix permission issues Signed-off-by: mudler <mudler@c3os.io> * 🤖 Adapt test to getcap output changes Signed-off-by: mudler <mudler@c3os.io> --------- Signed-off-by: mudler <mudler@c3os.io>
term - utilities for dealing with terminals
term provides structures and helper functions to work with terminal (state, sizes).
Using term
package main
import (
"log"
"os"
"github.com/moby/term"
)
func main() {
fd := os.Stdin.Fd()
if term.IsTerminal(fd) {
ws, err := term.GetWinsize(fd)
if err != nil {
log.Fatalf("term.GetWinsize: %s", err)
}
log.Printf("%d:%d\n", ws.Height, ws.Width)
}
}
Contributing
Want to hack on term? Docker's contributions guidelines apply.
Copyright and license
Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.