Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Quiet, linter
Gabe Kangas75b1a2a345e7
diff --git a/core/chat/persistence.go b/core/chat/persistence.goindex 315a3de5b2..684e272402 100644--- a/core/chat/persistence.go+++ b/core/chat/persistence.go@@ -326,6 +326,7 @@ func saveMessageVisibility(messageIDs []string, visible bool) error {return err}+ //nolint:gosecstmt, err := tx.Prepare("UPDATE messages SET hidden_at=? WHERE id IN (?" + strings.Repeat(",?", len(messageIDs)-1) + ")")if err != nil {return errdiff --git a/core/data/data.go b/core/data/data.goindex f233d542c3..336250aaeb 100644--- a/core/data/data.go+++ b/core/data/data.go@@ -52,7 +52,7 @@ func SetupPersistence(file string) error {if !utils.DoesFileExists(file) {log.Traceln("Creating new database at", file)- _, err := os.Create(file)+ _, err := os.Create(file) //nolint: gosecif err != nil {log.Fatal(err.Error())}diff --git a/core/offlineState.go b/core/offlineState.goindex 84c823f149..3ae512d04b 100644--- a/core/offlineState.go+++ b/core/offlineState.go@@ -82,7 +82,7 @@ func createEmptyOfflinePlaylist(playlistFilePath string, offlineFilename string)}p.Close()- f, err := os.Create(playlistFilePath)+ f, err := os.Create(playlistFilePath) //nolint:gosecif err != nil {log.Errorln(err)}diff --git a/core/playlist/writer.go b/core/playlist/writer.goindex a15e71040d..2df95f3fc1 100644--- a/core/playlist/writer.go+++ b/core/playlist/writer.go@@ -4,7 +4,7 @@ import "os"// WritePlaylist writes the playlist to disk.func WritePlaylist(data string, filePath string) error {- f, err := os.Create(filePath)+ f, err := os.Create(filePath) //nolint:gosecif err != nil {return err}diff --git a/core/transcoder/fileWriterReceiverService.go b/core/transcoder/fileWriterReceiverService.goindex e974cc08da..d5dbdc361a 100644--- a/core/transcoder/fileWriterReceiverService.go+++ b/core/transcoder/fileWriterReceiverService.go@@ -4,12 +4,11 @@ import ("bytes""io""net"+ "net/http""os""path/filepath""strings"- "net/http"-"github.com/owncast/owncast/config""github.com/owncast/owncast/utils"log "github.com/sirupsen/logrus"@@ -67,7 +66,7 @@ func (s *FileWriterReceiverService) uploadHandler(w http.ResponseWriter, r *http_, _ = io.Copy(&buf, r.Body)data := buf.Bytes()- f, err := os.Create(writePath)+ f, err := os.Create(writePath) //nolint: gosecif err != nil {returnError(err, w)returndiff --git a/utils/backup.go b/utils/backup.goindex f960a71571..207da64dbe 100644--- a/utils/backup.go+++ b/utils/backup.go@@ -39,7 +39,7 @@ func Restore(backupFile string, databaseFile string) error {rawSQL := b.String()- if _, err := os.Create(databaseFile); err != nil {+ if _, err := os.Create(databaseFile); err != nil { //nolint: gosecreturn errors.New("unable to write restored database")}