kaniko/vendor/github.com/moby/term
Michael Plump 3e56c7fd0f
chore: upgrade all the dependencies to their latest versions (#3454)
* chore: go get -u ./...

* chore: go mod tidy

* chore: go mod vendor

* chore: fix compilation for buildkit >= 0.15.0

* chore: upgrade to Go 1.24

* chore: upgrade the Debian container used in an integration test
2025-05-21 09:31:10 -04:00
..
windows chore(deps): bump github.com/moby/buildkit from 0.12.5 to 0.13.0 (#3072) 2024-03-20 19:46:17 -07:00
.gitignore Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
LICENSE Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
README.md Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
ascii.go Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
doc.go chore(deps): bump github.com/moby/buildkit from 0.12.5 to 0.13.0 (#3072) 2024-03-20 19:46:17 -07:00
proxy.go Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
term.go chore(deps): bump github.com/moby/buildkit from 0.12.5 to 0.13.0 (#3072) 2024-03-20 19:46:17 -07:00
term_unix.go chore: upgrade all the dependencies to their latest versions (#3454) 2025-05-21 09:31:10 -04:00
term_windows.go chore(deps): bump github.com/moby/buildkit from 0.12.5 to 0.13.0 (#3072) 2024-03-20 19:46:17 -07:00
termios_bsd.go Upgrade docker (#2440) 2023-03-23 20:34:25 -04:00
termios_nonbsd.go Upgrade docker (#2440) 2023-03-23 20:34:25 -04:00
termios_unix.go chore(deps): bump github.com/moby/buildkit from 0.12.5 to 0.13.0 (#3072) 2024-03-20 19:46:17 -07:00
termios_windows.go chore(deps): bump github.com/moby/buildkit from 0.12.5 to 0.13.0 (#3072) 2024-03-20 19:46:17 -07:00

README.md

term - utilities for dealing with terminals

Test GoDoc Go Report Card

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.

Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.