From 2cbd8ea802d1adf67a6ef1df6b9ade342c37241d Mon Sep 17 00:00:00 2001 From: Henrik Hodne Date: Tue, 5 Jan 2016 20:55:22 +0000 Subject: [PATCH] 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 Reviewed-by: Russ Cox --- ssh/example_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh/example_test.go b/ssh/example_test.go index 5315e45e..4d2eabd0 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