1
0
mirror of https://github.com/fumiama/go-nd-portal.git synced 2026-06-12 04:20:23 +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 (
ErrIllegalIPv4 = errors.New("illegal ipv4")
ErrUnexpectedChallengeResponse = errors.New("unexpected challenge response")
ErrUnexpectedLoginResponse = errors.New("unexpected login response")
)
type Portal struct {
@@ -82,7 +83,7 @@ func (p *Portal) Login(challenge string) error {
return err
}
if len(data) < 12 {
return ErrUnexpectedChallengeResponse
return ErrUnexpectedLoginResponse
}
type rsp struct {
Error string `json:"error"`