Backend: Refactor config initialization

Signed-off-by: Michael Mayer <michael@lastzero.net>
This commit is contained in:
Michael Mayer
2020-10-08 08:52:03 +02:00
parent 27dff245a5
commit 5fa47652ee
24 changed files with 130 additions and 113 deletions

View File

@@ -27,9 +27,10 @@ var PasswdCommand = cli.Command{
func passwdAction(ctx *cli.Context) error {
conf := config.NewConfig(ctx)
cctx, cancel := context.WithCancel(context.Background())
_, cancel := context.WithCancel(context.Background())
defer cancel()
if err := conf.Init(cctx); err != nil {
if err := conf.Init(); err != nil {
return err
}