From b8d0d0c3b6b2ffe40921aa4c247c101dd0ce958d Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 1 Jul 2023 22:10:22 +0800 Subject: Refactor: rename consts to follow Go idiom. Fix const comment style. --- bilibili/streaming.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bilibili/streaming.go') diff --git a/bilibili/streaming.go b/bilibili/streaming.go index 005ffd6..97b8e23 100644 --- a/bilibili/streaming.go +++ b/bilibili/streaming.go @@ -11,7 +11,7 @@ import ( "strings" ) -const kInitReadBytes = 4096 // 4KiB +const InitReadBytes = 4096 // 4KiB // CopyLiveStream read data from a livestream video stream, copy them to a writer. func (b Bilibili) CopyLiveStream( @@ -58,7 +58,7 @@ func (b Bilibili) CopyLiveStream( // read some first bytes to ensure that the live is really started, // so we don't create blank files if the live room is open // but the live hasn't started yet - initBytes := make([]byte, kInitReadBytes) + initBytes := make([]byte, InitReadBytes) _, err = io.ReadFull(resp.Body, initBytes) if err != nil { b.logger.Error("Failed to read stream initial bytes: %v", err) -- cgit v1.2.3