Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
Signed-off-by: everettraven <[email protected]>
  • Loading branch information
everettraven committed Dec 10, 2024
1 parent 7a3a6aa commit 19b0da7
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package restrictusers
import (
"k8s.io/apiserver/pkg/admission"

userinformer "github.com/openshift/client-go/user/informers/externalversions"
configv1informer "github.com/openshift/client-go/config/informers/externalversions"
userinformer "github.com/openshift/client-go/user/informers/externalversions"
)

func NewInitializer(userInformer userinformer.SharedInformerFactory, configInformer configv1informer.SharedInformerFactory) admission.PluginInitializer {
return &localInitializer{userInformer: userInformer, configInformer: configInformer}
return &localInitializer{userInformer: userInformer, configInformer: configInformer}
}

type WantsUserInformer interface {
Expand All @@ -17,12 +17,12 @@ type WantsUserInformer interface {
}

type WantsConfigInformer interface {
SetConfigInformer(configv1informer.SharedInformerFactory)
SetConfigInformer(configv1informer.SharedInformerFactory)
}

type localInitializer struct {
userInformer userinformer.SharedInformerFactory
configInformer configv1informer.SharedInformerFactory
userInformer userinformer.SharedInformerFactory
configInformer configv1informer.SharedInformerFactory
}

// Initialize will check the initialization interfaces implemented by each plugin
Expand All @@ -32,7 +32,7 @@ func (i *localInitializer) Initialize(plugin admission.Interface) {
wants.SetUserInformer(i.userInformer)
}

if wants, ok := plugin.(WantsConfigInformer); ok {
wants.SetConfigInformer(i.configInformer)
}
if wants, ok := plugin.(WantsConfigInformer); ok {
wants.SetConfigInformer(i.configInformer)
}
}

0 comments on commit 19b0da7

Please sign in to comment.