mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-26 13:48:53 +08:00

* Update dependencies Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix compose files and configs Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Upgrade image versions Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Update Postgres version Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Update test dependencies Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix fkey error handling Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
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.