summaryrefslogtreecommitdiff
path: root/bilibili/streaming.go
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-01 22:10:22 +0800
committerKeuin <[email protected]>2023-07-01 22:10:44 +0800
commitb8d0d0c3b6b2ffe40921aa4c247c101dd0ce958d (patch)
treec14f512312a6ee2fab6bdaef7cb55dfedbf19262 /bilibili/streaming.go
parent8f07f6f4d7e91a9e4b7164a39759907fac5fb8a1 (diff)
Refactor: rename consts to follow Go idiom. Fix const comment style.
Diffstat (limited to 'bilibili/streaming.go')
-rw-r--r--bilibili/streaming.go4
1 files changed, 2 insertions, 2 deletions
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)