chore: 清理代码

This commit is contained in:
耗子
2026-08-15 07:30:59 +08:00
parent dbc44f1d17
commit 2bde7f7a73
110 changed files with 291 additions and 353 deletions
-21
View File
@@ -24,27 +24,6 @@ type ClientConfig struct {
Timeout time.Duration `json:"timeout"`
}
func ClientConfigPassword(host, user, password string) *ClientConfig {
return &ClientConfig{
Timeout: 10 * time.Second,
AuthMethod: PASSWORD,
Host: host,
User: user,
Password: password,
}
}
func ClientConfigPublicKey(host, user, key, passphrase string) *ClientConfig {
return &ClientConfig{
Timeout: 10 * time.Second,
AuthMethod: PUBLICKEY,
Host: host,
User: user,
Key: key,
Passphrase: passphrase,
}
}
func NewSSHClient(conf ClientConfig) (*ssh.Client, error) {
if conf.Timeout == 0 {
conf.Timeout = 10 * time.Second