Small underhood changes, linter fixes

This commit is contained in:
eleksir
2025-10-20 21:07:10 +03:00
parent 6c00224f64
commit ff57b0af7d
23 changed files with 218 additions and 172 deletions

View File

@@ -4,6 +4,7 @@ import (
"aleesa-webapp-go/internal/config"
"aleesa-webapp-go/internal/log"
"encoding/json"
"errors"
"fmt"
"os"
"unsafe"
@@ -131,7 +132,7 @@ func ReadConfig() error {
// sampleConfig.OpenWeatherMap.Country is false by default
// Теперь надо бы попробовать загрузить список User Agent-ов, с которыми ходить в разные апишки.
uaFile := fmt.Sprintf("%s/useragents.txt", sampleConfig.DataDir)
uaFile := sampleConfig.DataDir + "/useragents.txt"
uaList, err := ReadLines(uaFile)
if err != nil {
@@ -149,7 +150,7 @@ func ReadConfig() error {
return nil
}
return fmt.Errorf("config was not loaded! Refusing to start")
return errors.New("config was not loaded! Refusing to start")
}
/* vim: set ft=go noet ai ts=4 sw=4 sts=4: */