Skip to content

Commit

Permalink
Merge pull request #1254 from Adirio/resolve-collision
Browse files Browse the repository at this point in the history
Resolve package and variable name collision
  • Loading branch information
k8s-ci-robot authored Jan 10, 2020
2 parents a5d55e8 + ae308ba commit a173def
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/scaffold/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ func (api *API) validateResourceGroup(r *resource.Resource) error {
// resourceExists returns true if API resource is already tracked by the PROJECT file.
// Note that this works only for v2, since in v1 resources are not tracked by the PROJECT file.
func (api *API) resourceExists() bool {
for _, resource := range api.project.Resources {
if resource.Group == api.Resource.Group &&
resource.Version == api.Resource.Version &&
resource.Kind == api.Resource.Kind {
for _, r := range api.project.Resources {
if r.Group == api.Resource.Group &&
r.Version == api.Resource.Version &&
r.Kind == api.Resource.Kind {
return true
}
}
Expand Down

0 comments on commit a173def

Please sign in to comment.