From 28b2e14b51bb0a0cd15714ff513550612785c74d Mon Sep 17 00:00:00 2001 From: Kevin Schoon Date: Tue, 22 Sep 2020 08:21:44 -0500 Subject: [PATCH] fix nil ptr config #40 --- pkg/cmd/cmd.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/cmd/cmd.go b/pkg/cmd/cmd.go index 17bcfb9..0f6825c 100644 --- a/pkg/cmd/cmd.go +++ b/pkg/cmd/cmd.go @@ -240,9 +240,6 @@ func New(config *pomo.Config) *cli.Cli { path = app.StringOpt("p path", defaultConfigPath(), "path to the pomo config directory") ) app.Before = func() { - if config == nil { - config = &pomo.Config{} - } maybe(pomo.LoadConfig(*path, config)) } app.Version("v version", pomo.Version) @@ -257,4 +254,4 @@ func New(config *pomo.Config) *cli.Cli { return app } -func Run() { New(nil).Run(os.Args) } +func Run() { New(&pomo.Config{}).Run(os.Args) }