diff --git a/snap/local/hooks/cmd/configure/configure.go b/snap/local/hooks/cmd/configure/configure.go index b488dbf4..a0f283b4 100644 --- a/snap/local/hooks/cmd/configure/configure.go +++ b/snap/local/hooks/cmd/configure/configure.go @@ -24,6 +24,8 @@ import ( "strings" hooks "github.com/canonical/edgex-snap-hooks/v2" + "github.com/canonical/edgex-snap-hooks/v2/log" + "github.com/canonical/edgex-snap-hooks/v2/options" local "github.com/edgexfoundry/device-rfid-llrp-go/hooks" ) @@ -49,6 +51,12 @@ func main() { } + log.SetComponentName("configure") + if err := options.ProcessAppConfig("device-rfid-llrp"); err != nil { + hooks.Error(fmt.Sprintf("could not process options: %v", err)) + os.Exit(1) + } + cli := hooks.NewSnapCtl() envJSON, err = cli.Config(hooks.EnvConfig) if err != nil { diff --git a/snap/local/hooks/go.mod b/snap/local/hooks/go.mod index 22814299..6464ea76 100644 --- a/snap/local/hooks/go.mod +++ b/snap/local/hooks/go.mod @@ -2,4 +2,4 @@ module github.com/edgexfoundry/device-rfid-llrp-go/hooks go 1.17 -require github.com/canonical/edgex-snap-hooks/v2 v2.1.3 +require github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.5 diff --git a/snap/local/hooks/go.sum b/snap/local/hooks/go.sum index 039e14dc..207bcb21 100644 --- a/snap/local/hooks/go.sum +++ b/snap/local/hooks/go.sum @@ -1,5 +1,5 @@ -github.com/canonical/edgex-snap-hooks/v2 v2.1.3 h1:mcV/atn6k6sN6Uik+lSQGEZi4Q6r96epgBW+u6AGZ3Y= -github.com/canonical/edgex-snap-hooks/v2 v2.1.3/go.mod h1:rOxrwdYL7hJDhxFH3uV+nVgLPjWOhJWgM5PRD5YG1jI= +github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.5 h1:EDFjmHy8CG4T8uFPqD+Per8Hgk250PvRsMgEDCXjYtE= +github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.5/go.mod h1:rOxrwdYL7hJDhxFH3uV+nVgLPjWOhJWgM5PRD5YG1jI= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=