diff --git a/controllers/spec/function_test.go b/controllers/spec/function_test.go index 88c9067a..feaeb026 100644 --- a/controllers/spec/function_test.go +++ b/controllers/spec/function_test.go @@ -97,7 +97,7 @@ func makeFunctionSample(functionName string) *v1alpha1.Function { } } -func makeFunctionSamplePackageUrl(functionName string) *v1alpha1.Function { +func makeFunctionSamplePackageURL(functionName string) *v1alpha1.Function { f := makeFunctionSample(functionName) f.Spec.Java.JarLocation = "function://public/default/java-function" f.Spec.Java.Jar = "/tmp/java-function.jar" @@ -106,7 +106,7 @@ func makeFunctionSamplePackageUrl(functionName string) *v1alpha1.Function { func TestInitContainerDownloader(t *testing.T) { utils.EnableInitContainers = true - function := makeFunctionSamplePackageUrl("test") + function := makeFunctionSamplePackageURL("test") objectMeta := MakeFunctionObjectMeta(function) diff --git a/controllers/spec/sink.go b/controllers/spec/sink.go index ad80b6df..237b00dd 100644 --- a/controllers/spec/sink.go +++ b/controllers/spec/sink.go @@ -19,12 +19,15 @@ package spec import ( "context" + "regexp" + + "github.com/streamnative/function-mesh/utils" + "google.golang.org/protobuf/encoding "github.com/streamnative/function-mesh/utils" "google.golang.org/protobuf/encoding/protojson" appsv1 "k8s.io/api/apps/v1" autov2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/batch/v1" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "regexp" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controllers/spec/source.go b/controllers/spec/source.go index d0d1125d..20d14416 100644 --- a/controllers/spec/source.go +++ b/controllers/spec/source.go @@ -20,6 +20,8 @@ package spec import ( "context" "fmt" + "regexp" + "github.com/streamnative/function-mesh/utils" "google.golang.org/protobuf/encoding/protojson" appsv1 "k8s.io/api/apps/v1" @@ -27,7 +29,6 @@ import ( v1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "regexp" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/streamnative/function-mesh/api/compute/v1alpha1"