I’m trying to explore github.com/pkg/sftp and got stuck with server execution. I tried executing https://github.com/pkg/sftp/blob/master/examples/go-sftp-server/main.go. The client connects but server closes if the client disconnects from server or client tries to authenticate.
I found a link Go SFTP server exits after one client connection with exact same problem. Someone has answered to use goroutine.
But I’m not sure on how to use it and make server alive.
I would really appreciate if anyone could help me out with any resource or gist.