Skip to content

Commit

Permalink
返回error
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYZhou committed Jan 16, 2024
1 parent 54f7e51 commit 0464370
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ssh/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ func (c *Cli) Connect() (*Cli, error) {
return c, nil
}

func Server(host string, user string, password string) *Cli {
func Server(host string, user string, password string) (*Cli ,error){

cli := Cli{
host: host,
user: user,
password: password,
}
c, _ := cli.Connect()
return c
c, err := cli.Connect()
return c,err
}

// 执行shellclient
Expand Down

0 comments on commit 0464370

Please sign in to comment.