diff options
author | Keuin <[email protected]> | 2023-07-02 14:48:47 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-02 14:49:17 +0800 |
commit | b6eb2c0da4e653c6fdd278bcbdcd55ec376cd481 (patch) | |
tree | bc0d58aedf6e8613d21351cd3cdfd8cd5b5999e2 /common | |
parent | b8d0d0c3b6b2ffe40921aa4c247c101dd0ce958d (diff) |
Refactor: move RoomId type to the correct package. Type all room ID usages.
Diffstat (limited to 'common')
-rw-r--r-- | common/testing/testutil.go (renamed from common/testutil.go) | 13 | ||||
-rw-r--r-- | common/types.go | 3 |
2 files changed, 7 insertions, 9 deletions
diff --git a/common/testutil.go b/common/testing/testutil.go index d6c3899..509c619 100644 --- a/common/testutil.go +++ b/common/testing/testutil.go @@ -1,8 +1,9 @@ -package common +package testing import ( "encoding/json" "fmt" + "github.com/keuin/slbr/bilibili" "io" "net/http" ) @@ -18,11 +19,11 @@ type LiveList struct { Data struct { Count int `json:"count"` Data []struct { - Face string `json:"face"` - Link string `json:"link"` - Roomid int `json:"roomid"` - Roomname string `json:"roomname"` - Nickname string `json:"nickname"` + Face string `json:"face"` + Link string `json:"link"` + Roomid bilibili.RoomId `json:"roomid"` + Roomname string `json:"roomname"` + Nickname string `json:"nickname"` } `json:"data"` } `json:"data"` } diff --git a/common/types.go b/common/types.go deleted file mode 100644 index 81456b4..0000000 --- a/common/types.go +++ /dev/null @@ -1,3 +0,0 @@ -package common - -type RoomId uint64 |