You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SSH protocol defines disconnect reason codes in section 11.1 of RFC 4253. I have an application where I want to inspect the disconnect reason code. I currently do this by checking the error string, but this is considered a bad practice.
Internally, the x/crypto/ssh package contains a disconnectMsg error type that is the structured form of the disconnect reason data. However, that type is not exposed externally for use with a function such as errors.As. I propose that disconnectMsg (or something like it) be exported so that users may unwrap the error and inspect the reason code.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputProposal
The SSH protocol defines disconnect reason codes in section 11.1 of RFC 4253. I have an application where I want to inspect the disconnect reason code. I currently do this by checking the error string, but this is considered a bad practice.
Internally, the
x/crypto/ssh
package contains adisconnectMsg
error type that is the structured form of the disconnect reason data. However, that type is not exposed externally for use with a function such aserrors.As
. I propose thatdisconnectMsg
(or something like it) be exported so that users may unwrap the error and inspect the reason code.The text was updated successfully, but these errors were encountered: