Variable collisions; Possible use of nil value (#256)
* Variable '*' collides with imported package name * Variable 'error' collides with builtin interface * '*' may have 'nil' or other unexpected value as its corresponding error variable may be not 'nil'
This commit is contained in:
@@ -74,10 +74,10 @@ func SetStreamAsDisconnected() {
|
||||
|
||||
if utils.DoesFileExists(playlistFilePath) {
|
||||
f, err := os.OpenFile(playlistFilePath, os.O_CREATE|os.O_RDWR, os.ModePerm)
|
||||
defer f.Close()
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
playlist, _, err := m3u8.DecodeFrom(bufio.NewReader(f), true)
|
||||
variantPlaylist := playlist.(*m3u8.MediaPlaylist)
|
||||
|
||||
Reference in New Issue
Block a user