MCPcopy Index your code
hub / github.com/coder/coder / ttyWidth

Function ttyWidth

cli/help.go:34–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func ttyWidth() int {
35 width, _, err := terminal.GetSize(0)
36 if err != nil {
37 return 80
38 }
39 return width
40}
41
42// wrapTTY wraps a string to the width of the terminal, or 80 no terminal
43// is detected.

Callers 2

wrapTTYFunction · 0.85
help.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected