From fd48122ae9c340b867bb31dbbde6a3b7a4667944 Mon Sep 17 00:00:00 2001 From: Keuin Date: Wed, 7 Sep 2022 10:19:17 +0800 Subject: Bugfix: wrong errorf placeholder --- danmaku/dmpkg/auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'danmaku/dmpkg/auth.go') 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 } -- cgit v1.2.3