Skip to content

Commit 9d916db

Browse files
committed
Use the updated configuration package
1 parent 900aa6a commit 9d916db

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

sshwifty.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ import (
2929

3030
func main() {
3131
configLoaders := make([]configuration.Loader, 0, 2)
32-
3332
if len(os.Getenv("SSHWIFTY_CONFIG")) > 0 {
34-
configLoaders = append(configLoaders,
35-
configuration.File(os.Getenv("SSHWIFTY_CONFIG")))
33+
configLoaders = append(
34+
configLoaders,
35+
configuration.CustomFile(configuration.GetEnv("SSHWIFTY_CONFIG")),
36+
)
3637
} else {
37-
configLoaders = append(configLoaders, configuration.File(""))
38-
configLoaders = append(configLoaders, configuration.Enviro())
38+
configLoaders = append(configLoaders, configuration.DefaultFile())
39+
configLoaders = append(configLoaders, configuration.Environ())
3940
}
40-
4141
e := application.
4242
New(os.Stderr, log.NewDebugOrNonDebugWriter(
4343
len(os.Getenv("SSHWIFTY_DEBUG")) > 0, application.Name, os.Stderr)).
@@ -46,10 +46,8 @@ func main() {
4646
commands.New(),
4747
controller.Builder,
4848
)
49-
5049
if e == nil {
5150
return
5251
}
53-
5452
os.Exit(1)
5553
}

0 commit comments

Comments
 (0)