From b53083f431b08cb61a450c765b8118d4f412bff4 Mon Sep 17 00:00:00 2001 From: Rui Fu Date: Fri, 21 Jun 2024 20:18:11 +0800 Subject: [PATCH] fix license --- ...resource.streamnative.io_pulsarconnections.yaml | 14 ++++++++++++++ ...urce.streamnative.io_pulsargeoreplications.yaml | 14 ++++++++++++++ .../resource.streamnative.io_pulsarnamespaces.yaml | 14 ++++++++++++++ ...resource.streamnative.io_pulsarpermissions.yaml | 14 ++++++++++++++ .../resource.streamnative.io_pulsartenants.yaml | 14 ++++++++++++++ .../resource.streamnative.io_pulsartopics.yaml | 14 ++++++++++++++ pkg/utils/common.go | 3 +-- 7 files changed, 85 insertions(+), 2 deletions(-) diff --git a/config/crd/bases/resource.streamnative.io_pulsarconnections.yaml b/config/crd/bases/resource.streamnative.io_pulsarconnections.yaml index 8ce5ac5b..b8ce0ad8 100644 --- a/config/crd/bases/resource.streamnative.io_pulsarconnections.yaml +++ b/config/crd/bases/resource.streamnative.io_pulsarconnections.yaml @@ -1,3 +1,17 @@ +# Copyright 2024 StreamNative +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/bases/resource.streamnative.io_pulsargeoreplications.yaml b/config/crd/bases/resource.streamnative.io_pulsargeoreplications.yaml index 4f177d58..03c7d2d6 100644 --- a/config/crd/bases/resource.streamnative.io_pulsargeoreplications.yaml +++ b/config/crd/bases/resource.streamnative.io_pulsargeoreplications.yaml @@ -1,3 +1,17 @@ +# Copyright 2024 StreamNative +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/bases/resource.streamnative.io_pulsarnamespaces.yaml b/config/crd/bases/resource.streamnative.io_pulsarnamespaces.yaml index 8528b885..c9855b7f 100644 --- a/config/crd/bases/resource.streamnative.io_pulsarnamespaces.yaml +++ b/config/crd/bases/resource.streamnative.io_pulsarnamespaces.yaml @@ -1,3 +1,17 @@ +# Copyright 2024 StreamNative +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/bases/resource.streamnative.io_pulsarpermissions.yaml b/config/crd/bases/resource.streamnative.io_pulsarpermissions.yaml index af701bf4..2ab07071 100644 --- a/config/crd/bases/resource.streamnative.io_pulsarpermissions.yaml +++ b/config/crd/bases/resource.streamnative.io_pulsarpermissions.yaml @@ -1,3 +1,17 @@ +# Copyright 2024 StreamNative +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/bases/resource.streamnative.io_pulsartenants.yaml b/config/crd/bases/resource.streamnative.io_pulsartenants.yaml index 39ffd176..d4d83ba4 100644 --- a/config/crd/bases/resource.streamnative.io_pulsartenants.yaml +++ b/config/crd/bases/resource.streamnative.io_pulsartenants.yaml @@ -1,3 +1,17 @@ +# Copyright 2024 StreamNative +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/bases/resource.streamnative.io_pulsartopics.yaml b/config/crd/bases/resource.streamnative.io_pulsartopics.yaml index 4c435101..09a384a1 100644 --- a/config/crd/bases/resource.streamnative.io_pulsartopics.yaml +++ b/config/crd/bases/resource.streamnative.io_pulsartopics.yaml @@ -1,3 +1,17 @@ +# Copyright 2024 StreamNative +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/pkg/utils/common.go b/pkg/utils/common.go index c64dfe91..c46de51d 100644 --- a/pkg/utils/common.go +++ b/pkg/utils/common.go @@ -40,8 +40,7 @@ func ConvertJSONToMapStringInterface(raw *apiextensionsv1.JSON) (map[string]inte result := make(map[string]interface{}) // Unmarshal the raw JSON object into the result map - err := json.Unmarshal(raw.Raw, &result) - if err != nil { + if err := json.Unmarshal(raw.Raw, &result); err != nil { return nil, err }