Skip to content

Commit

Permalink
feat: add config from file
Browse files Browse the repository at this point in the history
  • Loading branch information
merlindorin committed Jul 22, 2024
1 parent 60c6f35 commit 3579884
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/exporter-unifi-protect/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package main
import (
_ "embed"

kongyaml "github.com/alecthomas/kong-yaml"

"github.com/alecthomas/kong"
"github.com/hoomy-official/exporter-unifi-protect/cmd/exporter-unifi-protect/commads"
c "github.com/hoomy-official/go-shared/pkg/cmd"
Expand Down Expand Up @@ -37,6 +39,7 @@ func main() {
kong.Name(name),
kong.Description(description),
kong.UsageOnError(),
kong.Configuration(kongyaml.Loader, "/etc/unifi-protect/config.yaml", "~/.hoomy/unifi-protect.yaml"),
)

ctx.FatalIfErrorf(ctx.Run(cli.Commons))
Expand Down

0 comments on commit 3579884

Please sign in to comment.