Thank you very much. This looks like a good start. In addition to these comments, ...
11 years, 6 months ago
(2012-10-12 05:25:47 UTC)
#1
Thank you very much. This looks like a good start.
In addition to these comments, I suggest adding a few sample ModeLists, ie, the
EmptyModeList, for non interactive sessions, and some sample ones that would get
someone going with an interactive terminal.
Think about adding a test that at least uses this function. If there isn't the
facility in our ssh server to verify the modelist, maybe try the ssh/test
subpackage.
https://codereview.appspot.com/6655046/diff/2001/ssh/session.go
File ssh/session.go (right):
https://codereview.appspot.com/6655046/diff/2001/ssh/session.go#newcode54
ssh/session.go:54: const (
Luckily these will be coerced into a byte when they are used in the
append([]byte, byte) statement, so you can drop the uint8's
https://codereview.appspot.com/6655046/diff/2001/ssh/session.go#newcode188
ssh/session.go:188: func (s *Session) RequestPty(term string, h, w int,
termmodes TerminalModes) error {
I'm not sure a map is the right data structure for this. I would make a Mode
struct, then callers can use the compact literal syntax
http://play.golang.org/p/3u7T3PFm6Khttps://codereview.appspot.com/6655046/diff/2001/ssh/session.go#newcode194
ssh/session.go:194: termModes = append(termModes, TTY_OP_END)
As this is the only mode that takes no value, I don't think you should export a
constant for it, ie, make it tty_OP_ENV.
This is looking very good. One more round should do it. https://codereview.appspot.com/6655046/diff/16001/ssh/example_test.go File ssh/example_test.go (right): ...
11 years, 6 months ago
(2012-10-16 23:07:15 UTC)
#5
Thanks Willem, As it has been several months since we added to the ssh pkg ...
11 years, 6 months ago
(2012-10-21 05:18:42 UTC)
#11
Thanks Willem,
As it has been several months since we added to the ssh pkg API, and the first
breaking change in a while, would you please write a brief [ANN] to golang-nuts
explaining the change, what it does and how people can update their code.
Cheers
Dave
Issue 6655046: code review 6655046: go.crypto/ssh: add terminal modes to ssh.RequestPty()
Created 11 years, 6 months ago by willemvds
Modified 10 years, 9 months ago
Reviewers: dave_cheney.net
Base URL:
Comments: 11