mirror of
https://github.com/unpoller/unpoller.git
synced 2026-09-30 03:21:28 +02:00
Update to unifi library v5.6.0 and fix linter errors
- Update go.mod to use unifi library v5.6.0 (includes remote API support) - Remove temporary replace directive now that v5.6.0 is published - Fix empty-block linter errors in input.go by removing empty if blocks
This commit is contained in:
@@ -12,7 +12,7 @@ require (
|
||||
github.com/prometheus/common v0.67.5
|
||||
github.com/spf13/pflag v1.0.10
|
||||
github.com/stretchr/testify v1.11.1
|
||||
github.com/unpoller/unifi/v5 v5.5.0
|
||||
github.com/unpoller/unifi/v5 v5.6.0
|
||||
golang.org/x/crypto v0.47.0
|
||||
golang.org/x/term v0.39.0
|
||||
golift.io/cnfg v0.2.3
|
||||
@@ -46,6 +46,3 @@ require (
|
||||
golang.org/x/sys v0.40.0 // indirect
|
||||
google.golang.org/protobuf v1.36.11 // indirect
|
||||
)
|
||||
|
||||
// for local iterative development only
|
||||
replace github.com/unpoller/unifi/v5 => ../unifi
|
||||
|
||||
@@ -77,6 +77,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/unpoller/unifi/v5 v5.6.0 h1:qryEAJNYXG/WbjIqrIEZ/npRNBwHTsv/ZFbseYry8ug=
|
||||
github.com/unpoller/unifi/v5 v5.6.0/go.mod h1:vSIXIclPG9dpKxUp+pavfgENHWaTZXvDg7F036R1YCo=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
|
||||
@@ -304,10 +304,8 @@ func (u *InputUnifi) setDefaults(c *Controller) { //nolint:cyclop
|
||||
// Remote mode: only API key is used, no user/pass
|
||||
// For remote mode, API key is required
|
||||
// Will be set from RemoteAPIKey in Config if not provided
|
||||
if c.APIKey != "" {
|
||||
c.User = ""
|
||||
c.Pass = ""
|
||||
}
|
||||
c.User = ""
|
||||
c.Pass = ""
|
||||
} else {
|
||||
// Local mode: use API key if provided, otherwise user/pass
|
||||
if c.APIKey == "" {
|
||||
|
||||
Reference in New Issue
Block a user