Cleanup linter warnings
This commit is contained in:
@@ -80,8 +80,8 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) {
|
||||
return
|
||||
}
|
||||
|
||||
rtmpOut, rtmpIn := io.Pipe()
|
||||
_pipe = rtmpIn
|
||||
rtmpOut, rtmpIn := io.Pipe()
|
||||
_pipe = rtmpIn
|
||||
log.Infoln("Inbound stream connected.")
|
||||
_setStreamAsConnected(rtmpOut)
|
||||
|
||||
|
||||
@@ -22,9 +22,7 @@ func setupStats() error {
|
||||
statsSaveTimer := time.NewTicker(1 * time.Minute)
|
||||
go func() {
|
||||
for range statsSaveTimer.C {
|
||||
if err := saveStats(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
saveStats()
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -112,7 +110,7 @@ func pruneViewerCount() {
|
||||
_stats.Viewers = viewers
|
||||
}
|
||||
|
||||
func saveStats() error {
|
||||
func saveStats() {
|
||||
if err := data.SetPeakOverallViewerCount(_stats.OverallMaxViewerCount); err != nil {
|
||||
log.Errorln("error saving viewer count", err)
|
||||
}
|
||||
@@ -124,8 +122,6 @@ func saveStats() error {
|
||||
log.Errorln("error saving disconnect time", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func getSavedStats() models.Stats {
|
||||
|
||||
@@ -45,7 +45,7 @@ func (c *Libx264Codec) GlobalFlags() string {
|
||||
}
|
||||
|
||||
func (c *Libx264Codec) PixelFormat() string {
|
||||
return "yuv420p"
|
||||
return "yuv420p" //nolint:goconst
|
||||
}
|
||||
|
||||
func (c *Libx264Codec) ExtraArguments() string {
|
||||
@@ -78,7 +78,7 @@ func (c *Libx264Codec) GetPresetForLevel(l int) string {
|
||||
}
|
||||
|
||||
if l >= len(presetMapping) {
|
||||
return "superfast"
|
||||
return "superfast" //nolint:goconst
|
||||
}
|
||||
|
||||
return presetMapping[l]
|
||||
|
||||
Reference in New Issue
Block a user