mirror of
https://github.com/restic/restic.git
synced 2025-03-16 00:00:05 +01:00
fix lint - unused param prefix now used for smb
This commit is contained in:
parent
bc3331082c
commit
53a62d452c
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue