refactor!: use named arguments if there is more than one

This commit is contained in:
Aleksey Kulikov 2021-09-30 18:04:36 +03:00
parent ec80ad3dd4
commit 5f7fdf4bd3
66 changed files with 1920 additions and 1136 deletions

View file

@ -131,16 +131,16 @@ class RemoteCallbacks {
} else if (credentials is UserPass) {
final cred = credentials as UserPass;
credPointer[0] = credentials_bindings.userPass(
cred.username,
cred.password,
username: cred.username,
password: cred.password,
);
} else if (credentials is Keypair) {
final cred = credentials as Keypair;
credPointer[0] = credentials_bindings.sshKey(
cred.username,
cred.pubKey,
cred.privateKey,
cred.passPhrase,
username: cred.username,
publicKey: cred.pubKey,
privateKey: cred.privateKey,
passPhrase: cred.passPhrase,
);
} else if (credentials is KeypairFromAgent) {
final cred = credentials as KeypairFromAgent;
@ -148,10 +148,10 @@ class RemoteCallbacks {
} else if (credentials is KeypairFromMemory) {
final cred = credentials as KeypairFromMemory;
credPointer[0] = credentials_bindings.sshKeyFromMemory(
cred.username,
cred.pubKey,
cred.privateKey,
cred.passPhrase,
username: cred.username,
publicKey: cred.pubKey,
privateKey: cred.privateKey,
passPhrase: cred.passPhrase,
);
}