aboutsummaryrefslogtreecommitdiff
path: root/ssh/example_test.go
diff options
context:
space:
mode:
authorHenrik Hodne <henrik@hodne.io>2016-01-05 20:55:22 +0000
committerRuss Cox <rsc@golang.org>2016-10-04 13:31:33 +0000
commit2cbd8ea802d1adf67a6ef1df6b9ade342c37241d (patch)
treeb9d189e8948e822a406e456c94e497ec554b2647 /ssh/example_test.go
parentbde08f269ed27dc9a9c105465110825e04ab3d41 (diff)
downloadgo-x-crypto-2cbd8ea802d1adf67a6ef1df6b9ade342c37241d.tar.xz
ssh: fix height/width order in RequestPty example
The RequestPty function takes the size arguments in the order height, then width, instead of the more common width, then height. 80 is a very common width for a terminal, so when the example reads RequestPty(..., 80, 40, ...), it's easy to assume that the order is width-height. Switching the order should make it more obvious what is going on. Change-Id: I1d6266b1c0dcde5ee6e31a6d26d2dcaf14fec58a Reviewed-on: https://go-review.googlesource.com/18290 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'ssh/example_test.go')
-rw-r--r--ssh/example_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssh/example_test.go b/ssh/example_test.go
index 5315e45..4d2eabd 100644
--- a/ssh/example_test.go
+++ b/ssh/example_test.go
@@ -252,7 +252,7 @@ func ExampleSession_RequestPty() {
ssh.TTY_OP_OSPEED: 14400, // output speed = 14.4kbaud
}
// Request pseudo terminal
- if err := session.RequestPty("xterm", 80, 40, modes); err != nil {
+ if err := session.RequestPty("xterm", 40, 80, modes); err != nil {
log.Fatal("request for pseudo terminal failed: ", err)
}
// Start remote shell