From 53a62d452c54ce875108b9d7f70ba77a7ea97f4f Mon Sep 17 00:00:00 2001 From: Aneesh Nireshwalia Date: Mon, 10 Jul 2023 15:23:00 -0600 Subject: [PATCH] fix lint - unused param prefix now used for smb --- internal/backend/smb/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/backend/smb/config.go b/internal/backend/smb/config.go index c673a5524..0d133c2ba 100644 --- a/internal/backend/smb/config.go +++ b/internal/backend/smb/config.go @@ -128,13 +128,13 @@ func createConfig(user string, host string, port int, sharename, directory strin // ApplyEnvironment saves values from the environment to the config. func (cfg *Config) ApplyEnvironment(prefix string) error { if cfg.User == "" { - cfg.User = os.Getenv("RESTIC_SMB_USER") + cfg.User = os.Getenv(prefix + "RESTIC_SMB_USER") } if cfg.Password.String() == "" { - cfg.Password = options.NewSecretString(os.Getenv("RESTIC_SMB_PASSWORD")) + cfg.Password = options.NewSecretString(os.Getenv(prefix + "RESTIC_SMB_PASSWORD")) } if cfg.Domain == "" { - cfg.Domain = os.Getenv("RESTIC_SMB_DOMAIN") + cfg.Domain = os.Getenv(prefix + "RESTIC_SMB_DOMAIN") } if cfg.Domain == "" { cfg.Domain = DefaultDomain