chore(go): run betteralign and gofumpt on codebase

This commit is contained in:
Gabe Kangas
2023-10-08 14:22:28 -07:00
parent a31179b604
commit 8e79e2acfa
18 changed files with 73 additions and 61 deletions

View File

@ -13,8 +13,10 @@ import (
log "github.com/sirupsen/logrus"
)
var _lastTranscoderLogMessage = ""
var l = &sync.RWMutex{}
var (
_lastTranscoderLogMessage = ""
l = &sync.RWMutex{}
)
var errorMap = map[string]string{
"Unrecognized option 'vaapi_device'": "you are likely trying to utilize a vaapi codec, but your version of ffmpeg or your hardware doesn't support it. change your codec to libx264 and restart your stream",
@ -100,14 +102,14 @@ func createVariantDirectories() {
if len(data.GetStreamOutputVariants()) != 0 {
for index := range data.GetStreamOutputVariants() {
if err := os.MkdirAll(path.Join(config.HLSStoragePath, strconv.Itoa(index)), 0750); err != nil {
if err := os.MkdirAll(path.Join(config.HLSStoragePath, strconv.Itoa(index)), 0o750); err != nil {
log.Fatalln(err)
}
}
} else {
dir := path.Join(config.HLSStoragePath, strconv.Itoa(0))
log.Traceln("Creating", dir)
if err := os.MkdirAll(dir, 0750); err != nil {
if err := os.MkdirAll(dir, 0o750); err != nil {
log.Fatalln(err)
}
}