Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
34
func
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
wrapTTY
Function · 0.85
help.go
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected