mirror of https://github.com/restic/restic.git
fix lint - unused param prefix now used for smb
This commit is contained in:
parent
bc3331082c
commit
53a62d452c
|
@ -128,13 +128,13 @@ func createConfig(user string, host string, port int, sharename, directory strin
|
||||||
// ApplyEnvironment saves values from the environment to the config.
|
// ApplyEnvironment saves values from the environment to the config.
|
||||||
func (cfg *Config) ApplyEnvironment(prefix string) error {
|
func (cfg *Config) ApplyEnvironment(prefix string) error {
|
||||||
if cfg.User == "" {
|
if cfg.User == "" {
|
||||||
cfg.User = os.Getenv("RESTIC_SMB_USER")
|
cfg.User = os.Getenv(prefix + "RESTIC_SMB_USER")
|
||||||
}
|
}
|
||||||
if cfg.Password.String() == "" {
|
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 == "" {
|
if cfg.Domain == "" {
|
||||||
cfg.Domain = os.Getenv("RESTIC_SMB_DOMAIN")
|
cfg.Domain = os.Getenv(prefix + "RESTIC_SMB_DOMAIN")
|
||||||
}
|
}
|
||||||
if cfg.Domain == "" {
|
if cfg.Domain == "" {
|
||||||
cfg.Domain = DefaultDomain
|
cfg.Domain = DefaultDomain
|
||||||
|
|
Loading…
Reference in New Issue