diff options
author | Keuin <[email protected]> | 2022-09-07 10:19:17 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-09-07 10:19:24 +0800 |
commit | fd48122ae9c340b867bb31dbbde6a3b7a4667944 (patch) | |
tree | d5e4233f3329d158bf23865d3e1e3bd906da6b14 /danmaku/dmpkg | |
parent | c72e692be33d5ab2884db6e2f1cf027f150a108a (diff) |
Bugfix: wrong errorf placeholder
Diffstat (limited to 'danmaku/dmpkg')
-rw-r--r-- | danmaku/dmpkg/auth.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/danmaku/dmpkg/auth.go b/danmaku/dmpkg/auth.go index 5a205ad..c9720ea 100644 --- a/danmaku/dmpkg/auth.go +++ b/danmaku/dmpkg/auth.go @@ -35,7 +35,7 @@ func NewAuth(protocol ProtocolVer, roomId common.RoomId, authKey string) (exc Da func IsAuthOk(serverResponse DanmakuExchange) (bool, error) { if op := serverResponse.Operation; op != OpConnectOk { - return false, fmt.Errorf("server operation is not OpConnectOk: %w", op) + return false, fmt.Errorf("server operation is not OpConnectOk: %v", op) } var body struct { Code int `json:"code"` @@ -46,7 +46,7 @@ func IsAuthOk(serverResponse DanmakuExchange) (bool, error) { return false, fmt.Errorf("JSON decode error: %w", err) } if c := body.Code; c != 0 { - return false, fmt.Errorf("server response code is non-zero: %w", c) + return false, fmt.Errorf("server response code is non-zero: %v", c) } return true, nil } |