Skip to content

Commit 1522408

Browse files
committed
Update golangci-lint to v1.19.1
Also fix janus examples Resolves pion#51
1 parent 1f6643a commit 1522408

File tree

8 files changed

+9
-19
lines changed

8 files changed

+9
-19
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cache:
1717

1818
before_install:
1919
- sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
20-
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.18.0
20+
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.19.1
2121
- sh -c "cd c-data-channels && make"
2222

2323
install:

internal/gstreamer-sink/gst.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package gst provides an easy API to create an appsrc pipeline
12
package gst
23

34
/*

internal/gstreamer-src/gst.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package gst provides an easy API to create an appsink pipeline
12
package gst
23

34
/*

janus-gateway/streaming/main.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,16 @@ func watchHandle(handle *janus.Handle) {
3636
msg := <-handle.Events
3737
switch msg := msg.(type) {
3838
case *janus.SlowLinkMsg:
39-
fmt.Print("SlowLinkMsg type ", handle.Id)
39+
fmt.Print("SlowLinkMsg type ", handle.ID)
4040
case *janus.MediaMsg:
4141
fmt.Print("MediaEvent type", msg.Type, " receiving ", msg.Receiving)
4242
case *janus.WebRTCUpMsg:
43-
fmt.Print("WebRTCUp type ", handle.Id)
43+
fmt.Print("WebRTCUp type ", handle.ID)
4444
case *janus.HangupMsg:
45-
fmt.Print("HangupEvent type ", handle.Id)
45+
fmt.Print("HangupEvent type ", handle.ID)
4646
case *janus.EventMsg:
4747
fmt.Printf("EventMsg %+v", msg.Plugindata.Data)
4848
}
49-
5049
}
5150
}
5251

janus-gateway/video-room/main.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,17 @@ func watchHandle(handle *janus.Handle) {
1818
msg := <-handle.Events
1919
switch msg := msg.(type) {
2020
case *janus.SlowLinkMsg:
21-
log.Println("SlowLinkMsg type ", handle.Id)
21+
log.Println("SlowLinkMsg type ", handle.ID)
2222
case *janus.MediaMsg:
2323
log.Println("MediaEvent type", msg.Type, " receiving ", msg.Receiving)
2424
case *janus.WebRTCUpMsg:
25-
log.Println("WebRTCUp type ", handle.Id)
25+
log.Println("WebRTCUp type ", handle.ID)
2626
case *janus.HangupMsg:
27-
log.Println("HangupEvent type ", handle.Id)
27+
log.Println("HangupEvent type ", handle.ID)
2828
case *janus.EventMsg:
2929
log.Printf("EventMsg %+v", msg.Plugindata.Data)
3030
}
31-
3231
}
33-
3432
}
3533

3634
func main() {
@@ -152,5 +150,4 @@ func main() {
152150
}
153151

154152
select {}
155-
156153
}

sfu-ws/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ func checkError(err error) {
1818
}
1919

2020
func init() {
21-
2221
// Generate pem file for https
2322
genPem()
2423

@@ -31,7 +30,6 @@ func init() {
3130

3231
// Create the API object with the MediaEngine
3332
api = webrtc.NewAPI(webrtc.WithMediaEngine(m))
34-
3533
}
3634

3735
func main() {

sfu-ws/room.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const (
5252
)
5353

5454
func room(w http.ResponseWriter, r *http.Request) {
55-
5655
// Websocket client
5756
c, err := upgrader.Upgrade(w, r, nil)
5857
checkError(err)
@@ -79,7 +78,6 @@ func room(w http.ResponseWriter, r *http.Request) {
7978

8079
pubReceiver.OnTrack(func(remoteTrack *webrtc.Track, receiver *webrtc.RTPReceiver) {
8180
if remoteTrack.PayloadType() == webrtc.DefaultPayloadTypeVP8 || remoteTrack.PayloadType() == webrtc.DefaultPayloadTypeVP9 || remoteTrack.PayloadType() == webrtc.DefaultPayloadTypeH264 {
82-
8381
// Create a local video track, all our SFU clients will be fed via this track
8482
var err error
8583
videoTrackLock.Lock()
@@ -107,9 +105,7 @@ func room(w http.ResponseWriter, r *http.Request) {
107105
checkError(err)
108106
}
109107
}
110-
111108
} else {
112-
113109
// Create a local audio track, all our SFU clients will be fed via this track
114110
var err error
115111
audioTrackLock.Lock()
@@ -156,7 +152,6 @@ func room(w http.ResponseWriter, r *http.Request) {
156152
})
157153
})
158154
} else {
159-
160155
// Create a new PeerConnection
161156
subSender, err := api.NewPeerConnection(peerConnectionConfig)
162157
checkError(err)

sfu-ws/web.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
)
1515

1616
func genPem() {
17-
1817
privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
1918
checkError(err)
2019

0 commit comments

Comments
 (0)