Update linting

* Move errcheck exclude list to config file.
* Enable revive linter
* Fix up revive linting issues.

Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
SuperQ
2023-06-03 09:28:17 +02:00
parent 6e671f2d82
commit fab8e625a8
6 changed files with 22 additions and 18 deletions

View File

@@ -54,18 +54,18 @@ type UserPass struct {
Password string `yaml:"password"`
}
type ConfigHandler struct {
type Handler struct {
sync.RWMutex
Config *Config
}
func (ch *ConfigHandler) GetConfig() *Config {
func (ch *Handler) GetConfig() *Config {
ch.RLock()
defer ch.RUnlock()
return ch.Config
}
func (ch *ConfigHandler) ReloadConfig(f string, logger log.Logger) error {
func (ch *Handler) ReloadConfig(f string, logger log.Logger) error {
config := &Config{}
var err error
defer func() {