wdcli: Use progress writer instead of IOStream

This commit is contained in:
Tom Wiesing 2022-11-30 11:39:29 +01:00
parent 890022ae64
commit 3b78b06fff
No known key found for this signature in database
49 changed files with 396 additions and 393 deletions

View file

@ -2,9 +2,9 @@ package ssh2
import (
"context"
"io"
"github.com/gliderlabs/ssh"
"github.com/tkw1536/goprogram/stream"
)
const (
@ -13,10 +13,10 @@ const (
)
// Server returns an ssh server that implements the main ssh server
func (ssh2 *SSH2) Server(context context.Context, privateKeyPath string, io stream.IOStream) (*ssh.Server, error) {
func (ssh2 *SSH2) Server(context context.Context, privateKeyPath string, progress io.Writer) (*ssh.Server, error) {
var server ssh.Server
if err := ssh2.setupHostKeys(io, privateKeyPath, &server); err != nil {
if err := ssh2.setupHostKeys(progress, privateKeyPath, &server); err != nil {
return nil, err
}