Terminal control/Dimensions: Difference between revisions
→{{header|Go}}: add sub-repo version
(Go solution) |
(→{{header|Go}}: add sub-repo version) |
||
Line 212:
=={{header|Go}}==
===Sub-repository===
{{libheader|Go sub-repositories}}
<lang go>package main
import (
"fmt"
"os"
"code.google.com/p/go.crypto/ssh/terminal"
)
func main() {
w, h, err := terminal.GetSize(int(os.Stdout.Fd()))
if err != nil {
fmt.Println(err)
return
}
fmt.Println(h, w)
}</lang>
===External command===
<lang go>package main
|