Chore: add some linters and clean up the code

This commit is contained in:
Dreamacro
2023-04-04 14:53:59 +08:00
parent a7252a1576
commit 5045ca4574
8 changed files with 18 additions and 12 deletions

View File

@ -159,7 +159,7 @@ func ServerHandshake(rw net.Conn, authenticator auth.Authenticator) (addr Addr,
pass := string(authBuf[:passLen])
// Verify
if ok := authenticator.Verify(string(user), string(pass)); !ok {
if ok := authenticator.Verify(user, pass); !ok {
rw.Write([]byte{1, 1})
err = ErrAuth
return