Skip to content

Commit 92d8c04

Browse files
committed
Fix lint issues with golangci-lint@v2
1 parent 32d7429 commit 92d8c04

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

janus-gateway/streaming/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ func main() { // nolint
8080
go watchHandle(handle)
8181

8282
// Get streaming list
83-
_, err = handle.Request(map[string]interface{}{
83+
_, err = handle.Request(map[string]any{
8484
"request": "list",
8585
})
8686
if err != nil {
8787
panic(err)
8888
}
8989

9090
// Watch the second stream
91-
msg, err := handle.Message(map[string]interface{}{
91+
msg, err := handle.Message(map[string]any{
9292
"request": "watch",
9393
"id": 1,
9494
}, nil)
@@ -177,9 +177,9 @@ func main() { // nolint
177177
<-gatherComplete
178178

179179
// now we start
180-
_, err = handle.Message(map[string]interface{}{
180+
_, err = handle.Message(map[string]any{
181181
"request": "start",
182-
}, map[string]interface{}{
182+
}, map[string]any{
183183
"type": "answer",
184184
"sdp": peerConnection.LocalDescription().SDP,
185185
"trickle": false,

janus-gateway/video-room/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func main() { // nolint
122122

123123
go watchHandle(handle)
124124

125-
_, err = handle.Message(map[string]interface{}{
125+
_, err = handle.Message(map[string]any{
126126
"request": "join",
127127
"ptype": "publisher",
128128
"room": 1234,
@@ -132,12 +132,12 @@ func main() { // nolint
132132
panic(err)
133133
}
134134

135-
msg, err := handle.Message(map[string]interface{}{
135+
msg, err := handle.Message(map[string]any{
136136
"request": "publish",
137137
"audio": true,
138138
"video": true,
139139
"data": false,
140-
}, map[string]interface{}{
140+
}, map[string]any{
141141
"type": "offer",
142142
"sdp": peerConnection.LocalDescription().SDP,
143143
"trickle": false,

play-from-disk-mkv/main.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,7 @@ func sendMkv(mkvFile *os.File, audioTrack, videoTrack *webrtc.TrackLocalStaticSa
220220
annexBSlice = append(annexBSlice, spsAndPPS...)
221221
}
222222

223-
for {
224-
if len(block.Data[0]) == 0 {
225-
break
226-
}
227-
223+
for len(block.Data[0]) > 0 {
228224
naluSize := binary.BigEndian.Uint32(block.Data[0])
229225
block.Data[0] = block.Data[0][4:]
230226

sfu-ws/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ type threadSafeWriter struct {
413413
sync.Mutex
414414
}
415415

416-
func (t *threadSafeWriter) WriteJSON(v interface{}) error {
416+
func (t *threadSafeWriter) WriteJSON(v any) error {
417417
t.Lock()
418418
defer t.Unlock()
419419

0 commit comments

Comments
 (0)