Maint: pass only single strings to logger methods

- Do not assume formatting from logger's interface
- Allow to change golibs in the future to accept only strings for logger methods
This commit is contained in:
Quentin McGaw (desktop)
2021-07-23 17:36:08 +00:00
parent 21f4cf7ab5
commit 3c44214d01
34 changed files with 134 additions and 127 deletions

View File

@@ -4,8 +4,6 @@ import (
"io"
"os"
"strings"
"github.com/qdm12/gluetun/internal/constants"
)
// WriteAuthFile writes the OpenVPN auth file to disk with the right permissions.
@@ -48,7 +46,7 @@ func (c *configurator) WriteAuthFile(user, password string, puid, pgid int) erro
return nil
}
c.logger.Info("username and password changed in %s", constants.OpenVPNAuthConf)
c.logger.Info("username and password changed in " + c.authFilePath)
file, err = os.OpenFile(c.authFilePath, os.O_TRUNC|os.O_WRONLY, 0400)
if err != nil {
return err