Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

product.GetBoundTargets() returns empty array instead of null #87

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/bindings/bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func printProducts(products []product.APIProduct, printf shared.FormatFn) error
p.QuotaLimit = ""
}
p.Targets = p.GetBoundTargets()
if p.Targets == nil {
if len(p.Targets) == 0 {
unbound = append(unbound, p)
} else {
bound = append(bound, p)
Expand Down Expand Up @@ -352,7 +352,7 @@ func (b *bindings) verify(p *product.APIProduct, appMap map[string][]App, printf
if p == nil {
return nil
}
if p.GetBoundTargets() == nil {
if len(p.GetBoundTargets()) == 0 {
printf("Product %s is unbound to any target, no need to verify.", p.Name)
return nil
}
Expand Down
8 changes: 6 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ module github.com/apigee/apigee-remote-service-cli

go 1.15

// replace github.com/apigee/apigee-remote-service-golib => ../apigee-remote-service-golib

// replace github.com/apigee/apigee-remote-service-envoy => ../apigee-remote-service-envoy

require (
github.com/apigee/apigee-remote-service-envoy v1.2.0
github.com/apigee/apigee-remote-service-golib v1.2.0
github.com/apigee/apigee-remote-service-envoy v1.2.1-0.20201020222450-69c583ebd596
github.com/apigee/apigee-remote-service-golib v1.2.1-0.20201020221247-3391bb81c8bf
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
github.com/lestrrat-go/jwx v1.0.4
github.com/pkg/errors v0.9.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2c
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apigee/apigee-remote-service-envoy v1.2.0 h1:InxH4PgKwVR6UlSDU0cT7lg3a1LjJCJ7SW2xw+TRFiQ=
github.com/apigee/apigee-remote-service-envoy v1.2.0/go.mod h1:HcgrcwHXkUVZKYbkkGnDxyjMtYRdMA+WHPtVp2VHW20=
github.com/apigee/apigee-remote-service-golib v1.2.0 h1:hKDmddTYjPKFrlWm46UNXbn3+XJHjv2VE2TtyChAQ7o=
github.com/apigee/apigee-remote-service-golib v1.2.0/go.mod h1:J/2GDsnbdp7dyVWCTlmVs6+Tz7VWIo1F9yoZvBhvwe0=
github.com/apigee/apigee-remote-service-envoy v1.2.1-0.20201020222450-69c583ebd596 h1:uMqwGQDEK+4fFatXor8w3nNVhhuezoaQWDKd+B/mmg4=
github.com/apigee/apigee-remote-service-envoy v1.2.1-0.20201020222450-69c583ebd596/go.mod h1:HfVZthQtN6eSlSwQ2Y16c5d8iVVpvH2EXltW+dGeMq4=
github.com/apigee/apigee-remote-service-golib v1.2.1-0.20201020221247-3391bb81c8bf h1:7vJnKbSvSum5bxfj00XwhOwWg16eTzxMa5cDm4yGQZs=
github.com/apigee/apigee-remote-service-golib v1.2.1-0.20201020221247-3391bb81c8bf/go.mod h1:J/2GDsnbdp7dyVWCTlmVs6+Tz7VWIo1F9yoZvBhvwe0=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
Expand Down