style fix for error checking (#1170)

+additional linting
This commit is contained in:
Meisam
2021-07-09 20:16:44 +02:00
committed by GitHub
parent a13e1e75e2
commit 7361578412
22 changed files with 62 additions and 112 deletions

View File

@@ -32,16 +32,14 @@ func (s *LocalStorage) Setup() error {
// SegmentWritten is called when a single segment of video is written.
func (s *LocalStorage) SegmentWritten(localFilePath string) {
_, err := s.Save(localFilePath, 0)
if err != nil {
if _, err := s.Save(localFilePath, 0); err != nil {
log.Warnln(err)
}
}
// VariantPlaylistWritten is called when a variant hls playlist is written.
func (s *LocalStorage) VariantPlaylistWritten(localFilePath string) {
_, err := s.Save(localFilePath, 0)
if err != nil {
if _, err := s.Save(localFilePath, 0); err != nil {
log.Errorln(err)
return
}
@@ -49,8 +47,7 @@ func (s *LocalStorage) VariantPlaylistWritten(localFilePath string) {
// MasterPlaylistWritten is called when the master hls playlist is written.
func (s *LocalStorage) MasterPlaylistWritten(localFilePath string) {
_, err := s.Save(localFilePath, 0)
if err != nil {
if _, err := s.Save(localFilePath, 0); err != nil {
log.Warnln(err)
}
}