Commit 205be347 authored by Eric's avatar Eric

[Update] rename

parent 6578101e
...@@ -36,10 +36,10 @@ var ( ...@@ -36,10 +36,10 @@ var (
successPattern, _ = regexp.Compile(DefaultSuccessRegs) successPattern, _ = regexp.Compile(DefaultSuccessRegs)
) )
type LoginStatus int type AuthStatus int
const ( const (
AuthSuccess LoginStatus = iota AuthSuccess AuthStatus = iota
AuthPartial AuthPartial
AuthFailed AuthFailed
) )
...@@ -130,7 +130,7 @@ func (tc *ServerTelnetConnection) optionNegotiate(data []byte) []byte { ...@@ -130,7 +130,7 @@ func (tc *ServerTelnetConnection) optionNegotiate(data []byte) []byte {
return buf.Bytes() return buf.Bytes()
} }
func (tc *ServerTelnetConnection) login(data []byte) LoginStatus { func (tc *ServerTelnetConnection) login(data []byte) AuthStatus {
if incorrectPattern.Match(data) { if incorrectPattern.Match(data) {
return AuthFailed return AuthFailed
} else if usernamePattern.Match(data) { } else if usernamePattern.Match(data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment