]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve gofmt -s
authorqydysky <32743305+qydysky@users.noreply.github.com>
Fri, 3 Feb 2023 03:27:29 +0000 (11:27 +0800)
committerqydysky <32743305+qydysky@users.noreply.github.com>
Fri, 3 Feb 2023 03:27:29 +0000 (11:27 +0800)
22 files changed:
Json/Info.go
Json/apiXliveRevenueV1WalletGetStatus.go
Json/apixliveRevenueV1WalletGetRule.go
Json/gethistory.go
Reply/Heartbeat.go
Reply/gtk.go
Reply/ws_msg/ENTRY_EFFECT_MUST_RECEIVE.go
Reply/ws_msg/HOT_RANK_CHANGED.go
Reply/ws_msg/HOT_RANK_SETTLEMENT.go
Reply/ws_msg/LITTLE_MESSAGE_BOX.go
Reply/ws_msg/MESSAGEBOX_USER_MEDAL_CHANGE.go
Reply/ws_msg/PK_BATTLE_PRE_NEW.go
Reply/ws_msg/PK_BATTLE_PROCESS_NEW.go
Reply/ws_msg/PK_BATTLE_START_NEW.go
Reply/ws_msg/SEND_GIFT.go
Reply/ws_msg/STOP_LIVE_ROOM_LIST.go
Reply/ws_msg/SUPER_CHAT_MESSAGE_JPN.go
Reply/ws_msg/USER_TOAST_MSG.go
Reply/ws_msg/VOICE_JOIN_LIST.go
Reply/ws_msg/VOICE_JOIN_ROOM_COUNT_INFO.go
Reply/ws_msg/VOICE_JOIN_STATUS.go
Reply/ws_msg/VTR_GIFT_LOTTERY.go

index b508b6ddd92e9a646d081105b4f603db5048b158..4875fa2c4e0dea91a64e2dbe25823602e1f44b77 100644 (file)
@@ -78,4 +78,4 @@ type Info struct {
                        BroadcastType int    `json:"broadcast_type"`
                } `json:"live_room"`
        } `json:"data"`
-}
\ No newline at end of file
+}
index a47689633571210c08c827bf865d9c2d6c422864..eadfe404b84f3335abe7b2fbf10c007d3db3753f 100644 (file)
@@ -15,4 +15,4 @@ type ApiXliveRevenueV1WalletGetStatus struct {
                Status          int `json:"status"`
                Vip             int `json:"vip"`
        } `json:"data"`
-}
\ No newline at end of file
+}
index 0f9dabdde2e586fe8048956669099b738d474587..223e875f543897f562e8f0b0a9d112acbb3fc46b 100644 (file)
@@ -20,4 +20,4 @@ type ApixliveRevenueV1WalletGetRule struct {
                        Num500000 float64 `json:"500000"`
                } `json:"gold_2_silver_bonus"`
        } `json:"data"`
-}
\ No newline at end of file
+}
index f09b19dc82c9405c3a075bc221e489922b5d5c5f..912b8e2675aeec71d25252434cc4b280b41baa91 100644 (file)
@@ -32,4 +32,4 @@ type GetHistory struct {
        } `json:"data"`
        Message string `json:"message"`
        Msg     string `json:"msg"`
-} 
+}
index e4dde349d2b1e707e2903115f270ccf1647f50f1..12e6273e8276e890183e3fa6cabb26448318e8f5 100644 (file)
@@ -8,15 +8,15 @@ import (
        HeartBeat数据分派
 */
 
-var Heart_map = map[string]func(replyF, int) {
-       "heartbeat":replyF.heartbeat,//人气
+var Heart_map = map[string]func(replyF, int){
+       "heartbeat": replyF.heartbeat, //人气
 }
 
 //HeartBeat类型,将人气4位byte转为字符串,并送到上述map指定的方法
-func Heart(b []byte){
+func Heart(b []byte) {
        s := int(F.Btoi32(b, 0))
-       if F,ok := Heart_map["heartbeat"]; ok {
+       if F, ok := Heart_map["heartbeat"]; ok {
                var f replyF
-               F(f, s);
+               F(f, s)
        }
-}
\ No newline at end of file
+}
index 996ca1dfdc9ad62275897bddced445e0ed1cff83..d06654880c602a27c3628ef7ec9251d856bc1ad4 100644 (file)
@@ -518,7 +518,7 @@ func Gtk_danmu() {
                                }
                                var buf map[string]interface{}
                                json.Unmarshal(bb, &buf)
-                               for k, _ := range keep_key {
+                               for k := range keep_key {
                                        delete(keep_key, k)
                                }
                                for k, v := range buf {
@@ -739,7 +739,7 @@ func show(s, img_src string, to_grid ...int) {
                                if e == nil {
                                        imgbuf.Lock()
                                        if v, ok := c.C.K_v.LoadV(`gtk_内存头像数量`).(float64); ok && len(imgbuf.b) > int(v)+10 {
-                                               for k, _ := range imgbuf.b {
+                                               for k := range imgbuf.b {
                                                        delete(imgbuf.b, k)
                                                        if len(imgbuf.b) <= int(v) {
                                                                break
index 6780c2a17c195cf2cf7ed6f7deeb33ce9d741794..5c5afaeb6c09b72ed15101594ab0d865a9a83df8 100644 (file)
@@ -1,31 +1,32 @@
 package part
 
 type ENTRY_EFFECT_MUST_RECEIVE struct {
-       Cmd string `json:"cmd"`
+       Cmd  string `json:"cmd"`
        Data struct {
-               Id int `json:"id"`
-               Uid int `json:"uid"`
-               Target_id int `json:"target_id"`
-               Mock_effect int `json:"mock_effect"`
-               Face string `json:"face"`
-        Privilege_type int `json:"privilege_type"`
-        Copy_writing string `json:"copy_writing"`
-        Copy_color string `json:"copy_color"`
-        Highlight_color string `json:"highlight_color"`
-        Priority int `json:"priority"`
-        Basemap_url string `json:"basemap_url"`
-        Show_avatar int `json:"show_avatar"`
-        Effective_time int `json:"effective_time"`
-        Web_basemap_url string `json:"web_basemap_url"`
-        Web_effective_time int `json:"web_effective_time"`
-        Web_effect_close int `json:"web_effect_close"`
-        Web_close_time int `json:"web_close_time"`
-        Business int `json:"business"`
-        Copy_writing_v2 string `json:"copy_writing_v2"`
-        Icon_list []int `json:"icon_list"`
-        Max_delay_time int `json:"max_delay_time"`
+               Id                 int    `json:"id"`
+               Uid                int    `json:"uid"`
+               Target_id          int    `json:"target_id"`
+               Mock_effect        int    `json:"mock_effect"`
+               Face               string `json:"face"`
+               Privilege_type     int    `json:"privilege_type"`
+               Copy_writing       string `json:"copy_writing"`
+               Copy_color         string `json:"copy_color"`
+               Highlight_color    string `json:"highlight_color"`
+               Priority           int    `json:"priority"`
+               Basemap_url        string `json:"basemap_url"`
+               Show_avatar        int    `json:"show_avatar"`
+               Effective_time     int    `json:"effective_time"`
+               Web_basemap_url    string `json:"web_basemap_url"`
+               Web_effective_time int    `json:"web_effective_time"`
+               Web_effect_close   int    `json:"web_effect_close"`
+               Web_close_time     int    `json:"web_close_time"`
+               Business           int    `json:"business"`
+               Copy_writing_v2    string `json:"copy_writing_v2"`
+               Icon_list          []int  `json:"icon_list"`
+               Max_delay_time     int    `json:"max_delay_time"`
        } `json:"data"`
 }
+
 /*
 {
     "cmd": "ENTRY_EFFECT_MUST_RECEIVE",
@@ -55,4 +56,4 @@ type ENTRY_EFFECT_MUST_RECEIVE struct {
         "max_delay_time": 7
     }
 }
-*/
\ No newline at end of file
+*/
index 4f498aca5fc1fddcce6817641288b910a67a9764..7f213e0d229f305560025cad2f1e1b67d6e6ea89 100644 (file)
@@ -1,18 +1,18 @@
 package part
 
 type HOT_RANK_CHANGED struct {
-       Cmd string `json:"cmd"`
+       Cmd  string `json:"cmd"`
        Data struct {
-               Rank int `json:"rank"`
-               Trend int `json:"trend"`
-               Countdown int `json:"countdown"`
-               Timestamp int `json:"timestamp"`
-               Web_url string `json:"web_url"`
-               Live_url string `json:"live_url"`
-               Blink_url string `json:"blink_url"`
+               Rank          int    `json:"rank"`
+               Trend         int    `json:"trend"`
+               Countdown     int    `json:"countdown"`
+               Timestamp     int    `json:"timestamp"`
+               Web_url       string `json:"web_url"`
+               Live_url      string `json:"live_url"`
+               Blink_url     string `json:"blink_url"`
                Live_link_url string `json:"live_link_url"`
-               Pc_link_url string `json:"pc_link_url"`
-               Icon string `json:"icon"`
-               Area_name string `json:"area_name"`
+               Pc_link_url   string `json:"pc_link_url"`
+               Icon          string `json:"icon"`
+               Area_name     string `json:"area_name"`
        } `json:"data"`
 }
index de03608ecfae5dc864543499cc798e3c03ff2ad0..9cbb32495f4fb14db834f82c40863ad45139ccbd 100644 (file)
@@ -1,16 +1,16 @@
 package part
 
-type HOT_RANK_SETTLEMENT struct{
-    Cmd string `json:"cmd"`
-    Data struct{
-        Rank int `json:"rank"`
-        Uname string `json:"uname"`
-        Face string `json:"face"`
-        Timestamp int `json:"timestamp"`
-        Icon string `json:"icon"`
-        Area_name string `json:"area_name"`
-        Url string `json:"url"`
-        Cache_key string `json:"cache_key"`
-        Dm_msg string `json:"dm_msg"`
-    } `json:"data"`
+type HOT_RANK_SETTLEMENT struct {
+       Cmd  string `json:"cmd"`
+       Data struct {
+               Rank      int    `json:"rank"`
+               Uname     string `json:"uname"`
+               Face      string `json:"face"`
+               Timestamp int    `json:"timestamp"`
+               Icon      string `json:"icon"`
+               Area_name string `json:"area_name"`
+               Url       string `json:"url"`
+               Cache_key string `json:"cache_key"`
+               Dm_msg    string `json:"dm_msg"`
+       } `json:"data"`
 }
index 99ee8e956539ef73fffcb174cf86dfc093e0a5bf..66ffaefd13a6c8b25caff5cd2ed6f8e9e742d607 100644 (file)
@@ -1,16 +1,16 @@
 package part
 
 type LITTLE_MESSAGE_BOX struct {
-       Cmd string `json:"cmd"`
+       Cmd  string `json:"cmd"`
        Data struct {
-               From string `json:"from"`
-        Platform struct{
+               From     string `json:"from"`
+               Platform struct {
                        Android bool `json:"android"`
-                       Ios bool `json:"ios"`
-                       Web bool `json:"web"`
+                       Ios     bool `json:"ios"`
+                       Web     bool `json:"web"`
                } `json:"platform"`
-        Msg string `json:"msg"`
-        Room_id int `json:"room_id"`
-       Type int `json:"type"`
+               Msg     string `json:"msg"`
+               Room_id int    `json:"room_id"`
+               Type    int    `json:"type"`
        } `json:"data"`
 }
index 91f2a65126fe5b459bce68470c0480189e059ab1..e267ba3e8aff35bf531ff46e37a931240d7b2292 100644 (file)
@@ -1,21 +1,21 @@
 package part
 
 type MESSAGEBOX_USER_MEDAL_CHANGE struct {
-       Cmd string `json:"cmd"`
+       Cmd  string `json:"cmd"`
        Data struct {
-               Type int `json:"type"`
-        Uid int `json:"uid"`
-        Up_uid int `json:"up_uid"`
-        Medal_name string `json:"medal_name"`
-       Medal_level int `json:"medal_level"`
-        Medal_color_start int `json:"medal_color_start"`
-        Medal_color_end int `json:"medal_color_end"`
-        Medal_color_border int `json:"medal_color_border"`
-        Guard_level int `json:"guard_level"`
-        Is_lighted int `json:"is_lighted"`
-        Unlock int `json:"unlock"`
-        Unlock_level  int `json:"unlock_level"`
-        Multi_unlock_level string `json:"multi_unlock_level"`
-        Upper_bound_content string `json:"upper_bound_content"`
+               Type                int    `json:"type"`
+               Uid                 int    `json:"uid"`
+               Up_uid              int    `json:"up_uid"`
+               Medal_name          string `json:"medal_name"`
+               Medal_level         int    `json:"medal_level"`
+               Medal_color_start   int    `json:"medal_color_start"`
+               Medal_color_end     int    `json:"medal_color_end"`
+               Medal_color_border  int    `json:"medal_color_border"`
+               Guard_level         int    `json:"guard_level"`
+               Is_lighted          int    `json:"is_lighted"`
+               Unlock              int    `json:"unlock"`
+               Unlock_level        int    `json:"unlock_level"`
+               Multi_unlock_level  string `json:"multi_unlock_level"`
+               Upper_bound_content string `json:"upper_bound_content"`
        } `json:"data"`
-}
\ No newline at end of file
+}
index e24387691541211ed3b567ff007fe996431bb7d1..75a19b698ca8596ba665e8d9c97469ab1ef26df1 100644 (file)
@@ -18,4 +18,4 @@ type PK_BATTLE_PRE_NEW struct {
                EndWinTask  interface{} `json:"end_win_task"`
        } `json:"data"`
        Roomid int `json:"roomid"`
-}
\ No newline at end of file
+}
index e9a840a12bac47f4d336c3822dbf12592ff52ea7..a8307916bcf3c18f4c31d9117251f297a9f87273 100644 (file)
@@ -18,4 +18,4 @@ type PK_BATTLE_PROCESS_NEW struct {
                        BestUname string `json:"best_uname"`
                } `json:"match_info"`
        } `json:"data"`
-}
\ No newline at end of file
+}
index 201842f85900466c3dd5886d243d0d9c63bb7edb..933fa2894a4758fdad08fe3b9675ccc996245e57 100644 (file)
@@ -17,4 +17,4 @@ type PK_BATTLE_START_NEW struct {
                StarLightMsg  string `json:"star_light_msg"`
        } `json:"data"`
        Roomid string `json:"roomid"`
-}
\ No newline at end of file
+}
index d4c7672f171da85ad4ebce6ed18236e7648a9706..3efd8c726553a2fd83c51391011e5d04b2c1b4fc 100644 (file)
@@ -1,5 +1,5 @@
 package part
+
 type SEND_GIFT struct {
        Cmd  string `json:"cmd"`
        Data struct {
@@ -34,23 +34,23 @@ type SEND_GIFT struct {
                        UID        int         `json:"uid"`
                        Uname      string      `json:"uname"`
                } `json:"combo_send"`
-               ComboStayTime  int    `json:"combo_stay_time"`
-               ComboTotalCoin int    `json:"combo_total_coin"`
-               CritProb       int    `json:"crit_prob"`
-               Demarcation    int    `json:"demarcation"`
-               Dmscore        int    `json:"dmscore"`
-               Draw           int    `json:"draw"`
-               Effect         int    `json:"effect"`
-               EffectBlock    int    `json:"effect_block"`
-               Face           string `json:"face"`
-               Giftid         int    `json:"giftId"`
-               Giftname       string `json:"giftName"`
-               Gifttype       int    `json:"giftType"`
-               Gold           int    `json:"gold"`
-               GuardLevel     int    `json:"guard_level"`
-               IsFirst        bool   `json:"is_first"`
-               IsSpecialBatch int    `json:"is_special_batch"`
-               Magnification  float64    `json:"magnification"`
+               ComboStayTime  int     `json:"combo_stay_time"`
+               ComboTotalCoin int     `json:"combo_total_coin"`
+               CritProb       int     `json:"crit_prob"`
+               Demarcation    int     `json:"demarcation"`
+               Dmscore        int     `json:"dmscore"`
+               Draw           int     `json:"draw"`
+               Effect         int     `json:"effect"`
+               EffectBlock    int     `json:"effect_block"`
+               Face           string  `json:"face"`
+               Giftid         int     `json:"giftId"`
+               Giftname       string  `json:"giftName"`
+               Gifttype       int     `json:"giftType"`
+               Gold           int     `json:"gold"`
+               GuardLevel     int     `json:"guard_level"`
+               IsFirst        bool    `json:"is_first"`
+               IsSpecialBatch int     `json:"is_special_batch"`
+               Magnification  float64 `json:"magnification"`
                MedalInfo      struct {
                        AnchorRoomid     int    `json:"anchor_roomid"`
                        AnchorUname      string `json:"anchor_uname"`
@@ -102,4 +102,4 @@ st":true,"is_special_batch":0,"magnification":1,"medal_info":{"anchor_roomid":0,
 少废话","special":"","target_id":14110780},"name_color":"","num":1,"original_gift_name":"","price":100,"rcost":3892073142,"remain":0,"rnd":"
 1332407012","send_master":null,"silver":0,"super":0,"super_batch_gift_num":1,"super_gift_num":1,"svga_block":0,"tag_image":"","tid":"1623602
 183121500002","timestamp":1623602183,"top_list":null,"total_coin":100,"uid":333010355,"uname":"小尕子_"}}
-*/
\ No newline at end of file
+*/
index 348c9d29707c6ffae976d19a30bc0553425f965f..9d50a6e0b254fe4a809c9c3621243ae312d6866c 100644 (file)
@@ -5,5 +5,6 @@ type STOP_LIVE_ROOM_LIST struct {
        Data struct {
                RoomIDList []int `json:"room_id_list"`
        } `json:"data"`
-} 
-//{"cmd":"STOP_LIVE_ROOM_LIST","data":{"room_id_list":[22301508,14091554,21782859]}}
\ No newline at end of file
+}
+
+//{"cmd":"STOP_LIVE_ROOM_LIST","data":{"room_id_list":[22301508,14091554,21782859]}}
index 80898b57a79285dc34a4e0539ae37cbe26c7aa07..f94af6569e76a56db7af4643d0df2e4a8b67b2bd 100644 (file)
@@ -52,4 +52,4 @@ e00","face":"http:\/\/i0.hdslb.com\/bfs\/face\/member\/noface.jpg","face_frame":
 e3ef1b22f3df61a.png","guard_level":1,"user_level":43,"level_color":"#ff86b2","is_vip":0,"is_svip":0,"is_main_vip":0,"title":"0","manager":0}
 ,"time":7200,"start_time":1623612710,"end_time":1623619910,"gift":{"num":1,"gift_id":12000,"gift_name":"\u9192\u76ee\u7559\u8a00"}},"roomid"
 :"47867"}
-*/
\ No newline at end of file
+*/
index daaac942033305466e28448bc8dab0b345372032..5a297d0e7a56eb040311d30dc43c12937b89b63d 100644 (file)
@@ -24,8 +24,9 @@ type USER_TOAST_MSG struct {
                Username         string `json:"username"`
        } `json:"data"`
 }
+
 /*
 {"cmd":"USER_TOAST_MSG","data":{"anchor_show":true,"color":"#00D1F1","dmscore":90,"end_time":1623612866,"guard_level":3,"is_show":0,"num":1,
 "op_type":3,"payflow_id":"2106140334131392145517282","price":138000,"role_name":"舰长","start_time":1623612866,"svga_block":0,"target_guard_
 count":820,"toast_msg":"\u003c%大桶麦丽素%\u003e 自动续费了舰长","uid":40144551,"unit":"月","user_show":true,"username":"大桶麦丽素"}}
-*/
\ No newline at end of file
+*/
index c5c2ce8672d61c11c115f0f4c42994c61effa430..a910646e461cb7f30f2ab2aa003c81a6d69b9b21 100644 (file)
@@ -11,4 +11,5 @@ type VOICE_JOIN_LIST struct {
        } `json:"data"`
        Roomid int `json:"roomid"`
 }
-//{"cmd":"VOICE_JOIN_LIST","data":{"room_id":1017,"category":1,"apply_count":62,"red_point":1,"refresh":0},"roomid":1017}
\ No newline at end of file
+
+//{"cmd":"VOICE_JOIN_LIST","data":{"room_id":1017,"category":1,"apply_count":62,"red_point":1,"refresh":0},"roomid":1017}
index db42a3b2574c85471d8272bb4884542a8516edff..daf950bfdad78a83766af23954d7550de39718b6 100644 (file)
@@ -12,4 +12,5 @@ type VOICE_JOIN_ROOM_COUNT_INFO struct {
        } `json:"data"`
        Roomid int `json:"roomid"`
 }
-//{"cmd":"VOICE_JOIN_ROOM_COUNT_INFO","data":{"room_id":1017,"root_status":1,"room_status":1,"apply_count":62,"notify_count":0,"red_point":0},"roomid":1017}
\ No newline at end of file
+
+//{"cmd":"VOICE_JOIN_ROOM_COUNT_INFO","data":{"room_id":1017,"root_status":1,"room_status":1,"apply_count":62,"notify_count":0,"red_point":0},"roomid":1017}
index 7aa03b6f353fdf1ab9e279babca00d2dba5ea2e8..1bbbb75d47a49c509c796478176a6fda5f759220 100644 (file)
@@ -17,4 +17,5 @@ type VOICE_JOIN_STATUS struct {
        } `json:"data"`
        Roomid int `json:"roomid"`
 }
-//{"cmd":"VOICE_JOIN_STATUS","data":{"room_id":1017,"status":0,"channel":"","channel_type":"voice","uid":0,"user_name":"","head_pic":"","guard":0,"start_at":0,"current_time":1621702198,"web_share_link":"https:\/\/live.bilibili.com\/h5\/1017"},"roomid":1017}
\ No newline at end of file
+
+//{"cmd":"VOICE_JOIN_STATUS","data":{"room_id":1017,"status":0,"channel":"","channel_type":"voice","uid":0,"user_name":"","head_pic":"","guard":0,"start_at":0,"current_time":1621702198,"web_share_link":"https:\/\/live.bilibili.com\/h5\/1017"},"roomid":1017}
index e461ded3dfdf66b8308e81753759264ecfa3af4a..edd94cc4814cb45eb8faec3c764691dfeb099fc7 100644 (file)
@@ -14,6 +14,7 @@ type VTR_GIFT_LOTTERY struct {
                LotteryID        string `json:"lottery_id"`
        } `json:"data"`
 }
+
 /*
 {
     "cmd": "VTR_GIFT_LOTTERY",
@@ -25,4 +26,4 @@ type VTR_GIFT_LOTTERY struct {
         "toast_msg": ""
     }
 }
-*/
\ No newline at end of file
+*/