golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.87k stars 17.52k forks source link

proposal: x/crypto/ssh: export a method Disconnect in Conn interface #37913

Open wutz opened 4 years ago

wutz commented 4 years ago

What version of Go are you using (go version)?

$ go version
go version go1.14 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/wutz/.cache/go-build"
GOENV="/home/wutz/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY="git.paratera.net"
GONOSUMDB="git.paratera.net"
GOOS="linux"
GOPATH="/home/wutz/.go/path"
GOPRIVATE="git.paratera.net"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/home/wutz/.go/root"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/wutz/.go/root/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/wutz/go/ssh/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build427084596=/tmp/go-build -gno-record-gcc-switches"

Proposal: Feature Request

https://github.com/golang/crypto/blob/1b76d66859c6111b3d5c3ea6600ea44dc188bf12/ssh/connection.go#L72-L75

Want to export a method Disconnect

nwtgck commented 1 year ago

I would like to use .Disconnect() too for an SSH client implementation.