Quiet, linter
This commit is contained in:
parent
7b7bbe405b
commit
8bc40486f8
@ -326,6 +326,7 @@ func saveMessageVisibility(messageIDs []string, visible bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
//nolint:gosec
|
||||
stmt, err := tx.Prepare("UPDATE messages SET hidden_at=? WHERE id IN (?" + strings.Repeat(",?", len(messageIDs)-1) + ")")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -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: gosec
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ func createEmptyOfflinePlaylist(playlistFilePath string, offlineFilename string)
|
||||
}
|
||||
|
||||
p.Close()
|
||||
f, err := os.Create(playlistFilePath)
|
||||
f, err := os.Create(playlistFilePath) //nolint:gosec
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
}
|
||||
|
@ -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:gosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -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: gosec
|
||||
if err != nil {
|
||||
returnError(err, w)
|
||||
return
|
||||
|
@ -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: gosec
|
||||
return errors.New("unable to write restored database")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user