Skip to content

Commit

Permalink
fix: duplicate import in network_policy.go
Browse files Browse the repository at this point in the history
  • Loading branch information
qsyqian committed Aug 6, 2019
1 parent ad7b5c2 commit db9783a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/controller/network_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"strings"

corev1 "k8s.io/api/core/v1"
"k8s.io/api/networking/v1"
netv1 "k8s.io/api/networking/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -48,8 +47,8 @@ func (c *Controller) enqueueUpdateNp(old, new interface{}) {
if !c.isLeader() {
return
}
oldNp := old.(*v1.NetworkPolicy)
newNp := new.(*v1.NetworkPolicy)
oldNp := old.(*netv1.NetworkPolicy)
newNp := new.(*netv1.NetworkPolicy)
if !reflect.DeepEqual(oldNp.Spec, newNp.Spec) {
var key string
var err error
Expand Down

0 comments on commit db9783a

Please sign in to comment.