1
0
mirror of https://github.com/fumiama/go-nd-portal.git synced 2026-06-29 23:51:06 +08:00
This commit is contained in:
源文雨
2022-11-26 00:41:15 +08:00
parent 8743bf9b5d
commit be33e0df7e

View File

@@ -16,6 +16,7 @@ import (
var ( var (
ErrIllegalIPv4 = errors.New("illegal ipv4") ErrIllegalIPv4 = errors.New("illegal ipv4")
ErrUnexpectedChallengeResponse = errors.New("unexpected challenge response") ErrUnexpectedChallengeResponse = errors.New("unexpected challenge response")
ErrUnexpectedLoginResponse = errors.New("unexpected login response")
) )
type Portal struct { type Portal struct {
@@ -82,7 +83,7 @@ func (p *Portal) Login(challenge string) error {
return err return err
} }
if len(data) < 12 { if len(data) < 12 {
return ErrUnexpectedChallengeResponse return ErrUnexpectedLoginResponse
} }
type rsp struct { type rsp struct {
Error string `json:"error"` Error string `json:"error"`