Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 6, 2025
1 parent 5087122 commit 4c267b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ func (c *Client) Now() (time.Time, error) {
// Av2Bv 将av号转换为bv号,返回格式为"BV1xxxxxxxxx"。
func Av2Bv(aid int) string {
const (
xorCode = 0x1552356C4CDB
maxAid int64 = 1 << 51
alphabet = "FcwAPNKTMug3GV5Lj7EJnHpWsx4tb8haYeviqBz6rkCy12mUSDQX9RdoZf"
xorCode = 0x1552356C4CDB
maxAid int64 = 1 << 51
alphabet = "FcwAPNKTMug3GV5Lj7EJnHpWsx4tb8haYeviqBz6rkCy12mUSDQX9RdoZf"
)
bvid := []byte("BV1000000000")
tmp := (maxAid | int64(aid)) ^ xorCode
Expand All @@ -85,9 +85,9 @@ func Bv2Av(bvid string) int {
panic("bvid 格式错误: " + bvid)
}
const (
xorCode = 0x1552356C4CDB
xorCode = 0x1552356C4CDB
maskCode int64 = 1<<51 - 1
alphabet = "FcwAPNKTMug3GV5Lj7EJnHpWsx4tb8haYeviqBz6rkCy12mUSDQX9RdoZf"
alphabet = "FcwAPNKTMug3GV5Lj7EJnHpWsx4tb8haYeviqBz6rkCy12mUSDQX9RdoZf"
)
var tmp int64 = 0
for _, e := range []int{9, 7, 5, 6, 4, 8, 3, 10, 11} {
Expand Down

0 comments on commit 4c267b8

Please sign in to comment.