mirror of
https://github.com/fumiama/go-nd-portal.git
synced 2026-06-30 08:00:27 +08:00
fix
This commit is contained in:
@@ -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"`
|
||||||
|
|||||||
Reference in New Issue
Block a user