From f9781d287d31ec40c7c3eb77d5ac12eb68622aaa Mon Sep 17 00:00:00 2001 From: Filippe Spolti Date: Mon, 15 Jan 2024 14:47:58 -0300 Subject: [PATCH 1/2] chore: Upgrade google.golang.org/protobuf (#79) chore: Fix Stack-based Buffer Overflow on protobuf on protobuf - https://security.snyk.io/vuln/SNYK-GOLANG-GOOGLEGOLANGORGPROTOBUFENCODINGPROTOJSON-6137908 Signed-off-by: Spolti --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ef0e3fc3..d376564d 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( golang.org/x/sync v0.1.0 google.golang.org/api v0.114.0 google.golang.org/grpc v1.56.3 - google.golang.org/protobuf v1.30.0 + google.golang.org/protobuf v1.32.0 // controller-runtime dependency is only used for logging sigs.k8s.io/controller-runtime v0.14.6 ) diff --git a/go.sum b/go.sum index 51487918..809cb841 100644 --- a/go.sum +++ b/go.sum @@ -255,8 +255,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 25fe3bd42eb9a44e0fdb93c6cd0211d2fa0fad53 Mon Sep 17 00:00:00 2001 From: Filippe Spolti Date: Wed, 13 Mar 2024 15:25:13 -0300 Subject: [PATCH 2/2] chore: Standardize license headers (#77) - Add missing license headers before running `go fmt` - Format all *.go files to have the empty line above the package declaration so `go fmt` does not treat the license header as the package comment --------- Signed-off-by: Spolti --- Dockerfile | 3 +- Makefile | 6 ++- internal/envconfig/envconfig.go | 3 +- internal/modelschema/modelschema.go | 3 +- internal/util/connect.go | 3 +- internal/util/connect_test.go | 3 +- internal/util/fileutil.go | 3 +- internal/util/join.go | 3 +- internal/util/join_test.go | 3 +- internal/util/loadmodel.go | 3 +- model-mesh-mlserver-adapter/main.go | 3 +- .../mlserver/mock_mlserver_server.go | 1 + .../server/adaptmodellayout_test.go | 1 + model-mesh-mlserver-adapter/server/config.go | 3 +- model-mesh-mlserver-adapter/server/server.go | 3 +- .../server/server_test.go | 3 +- model-mesh-ovms-adapter/main.go | 3 +- .../server/adaptmodellayout.go | 3 +- .../server/adaptmodellayout_test.go | 3 +- model-mesh-ovms-adapter/server/config.go | 3 +- model-mesh-ovms-adapter/server/const.go | 3 +- model-mesh-ovms-adapter/server/modelconfig.go | 5 ++- .../server/modelmanager.go | 3 +- .../server/modelmanager_test.go | 3 +- model-mesh-ovms-adapter/server/server.go | 3 +- model-mesh-ovms-adapter/server/server_test.go | 3 +- model-mesh-torchserve-adapter/main.go | 1 + .../server/config.go | 1 + .../server/server.go | 1 + .../server/server_test.go | 1 + .../torchserve/mock_torchserve_server.go | 1 + model-mesh-triton-adapter/main.go | 3 +- .../server/adaptmodellayout.go | 3 +- .../server/adaptmodellayout_test.go | 3 +- model-mesh-triton-adapter/server/config.go | 3 +- model-mesh-triton-adapter/server/const.go | 3 +- model-mesh-triton-adapter/server/schema.go | 3 +- .../server/schema_test.go | 3 +- model-mesh-triton-adapter/server/server.go | 3 +- .../server/server_test.go | 3 +- model-mesh-triton-adapter/server/utils.go | 3 +- .../triton/adapter_client/adapter_client.go | 3 +- .../triton/mesh_client/mesh_client.go | 3 +- .../triton/mock_triton_server.go | 3 +- model-serving-puller/main.go | 3 +- model-serving-puller/puller/config.go | 3 +- model-serving-puller/puller/dotpath.go | 3 +- model-serving-puller/puller/dotpath_test.go | 3 +- model-serving-puller/puller/puller.go | 6 +-- model-serving-puller/puller/puller_test.go | 3 +- model-serving-puller/server/config.go | 3 +- model-serving-puller/server/modelstate.go | 3 +- .../server/modelstate_test.go | 3 +- model-serving-puller/server/server.go | 3 +- pullman/cache.go | 3 +- pullman/cache_test.go | 3 +- pullman/cmd/main.go | 3 +- pullman/config.go | 3 +- pullman/config_test.go | 3 +- pullman/helpers.go | 3 +- pullman/pullman.go | 5 ++- pullman/pullman_test.go | 3 +- pullman/storageproviders/azure/downloader.go | 3 +- pullman/storageproviders/azure/provider.go | 3 +- .../storageproviders/azure/provider_test.go | 3 +- pullman/storageproviders/gcs/downloader.go | 3 +- pullman/storageproviders/gcs/provider.go | 3 +- pullman/storageproviders/gcs/provider_test.go | 3 +- pullman/storageproviders/http/downloader.go | 3 +- scripts/add_headers.sh | 39 +++++++++++++++++++ 70 files changed, 176 insertions(+), 66 deletions(-) create mode 100755 scripts/add_headers.sh diff --git a/Dockerfile b/Dockerfile index eba7ca90..1d99efc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -81,7 +81,8 @@ COPY go.mod go.sum ./ # Install go protoc plugins # no required module provides package google.golang.org/grpc/cmd/protoc-gen-go-grpc # to add it run `go get google.golang.org/grpc/cmd/protoc-gen-go-grpc` -ENV PATH $HOME/go/bin:$PATH +ENV GOPATH $HOME/go +ENV PATH $GOPATH/bin:$PATH RUN true \ && go get google.golang.org/grpc/cmd/protoc-gen-go-grpc \ && go install google.golang.org/protobuf/cmd/protoc-gen-go \ diff --git a/Makefile b/Makefile index eff2176f..332ebcd2 100644 --- a/Makefile +++ b/Makefile @@ -56,9 +56,13 @@ test: .PHONY: fmt ## Auto-format source code and report code-style violations (lint) -fmt: +fmt: add_license_headers ./scripts/fmt.sh +.PHONY: add_license_headers check_addlicense +add_license_headers: + ./scripts/add_headers.sh + .PHONY: proto.compile ## Compile protos proto.compile: diff --git a/internal/envconfig/envconfig.go b/internal/envconfig/envconfig.go index a56060f3..9d3be3f6 100644 --- a/internal/envconfig/envconfig.go +++ b/internal/envconfig/envconfig.go @@ -4,13 +4,14 @@ // 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 +// 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. + package envconfig import ( diff --git a/internal/modelschema/modelschema.go b/internal/modelschema/modelschema.go index 11874037..630b4564 100644 --- a/internal/modelschema/modelschema.go +++ b/internal/modelschema/modelschema.go @@ -4,13 +4,14 @@ // 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 +// 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. + package modelschema import ( diff --git a/internal/util/connect.go b/internal/util/connect.go index 11166df9..d4b78520 100644 --- a/internal/util/connect.go +++ b/internal/util/connect.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/connect_test.go b/internal/util/connect_test.go index 8d4fd218..a3397b6f 100644 --- a/internal/util/connect_test.go +++ b/internal/util/connect_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/fileutil.go b/internal/util/fileutil.go index f1c86c02..7c7aff6c 100644 --- a/internal/util/fileutil.go +++ b/internal/util/fileutil.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/join.go b/internal/util/join.go index 57f7607e..0f32dc9a 100644 --- a/internal/util/join.go +++ b/internal/util/join.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/join_test.go b/internal/util/join_test.go index 325c5819..d4786862 100644 --- a/internal/util/join_test.go +++ b/internal/util/join_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/internal/util/loadmodel.go b/internal/util/loadmodel.go index b9621b66..42dcb375 100644 --- a/internal/util/loadmodel.go +++ b/internal/util/loadmodel.go @@ -4,13 +4,14 @@ // 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 +// 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. + package util import ( diff --git a/model-mesh-mlserver-adapter/main.go b/model-mesh-mlserver-adapter/main.go index 368f47e4..0700d43d 100644 --- a/model-mesh-mlserver-adapter/main.go +++ b/model-mesh-mlserver-adapter/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go b/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go index a577c1cd..0d74e289 100644 --- a/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go +++ b/model-mesh-mlserver-adapter/mlserver/mock_mlserver_server.go @@ -11,6 +11,7 @@ // 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. + package main import ( diff --git a/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go b/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go index 5e9c3914..54cbcc37 100644 --- a/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-mlserver-adapter/server/adaptmodellayout_test.go @@ -11,6 +11,7 @@ // 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. + package server import ( diff --git a/model-mesh-mlserver-adapter/server/config.go b/model-mesh-mlserver-adapter/server/config.go index 0ceef9d9..26f7d478 100644 --- a/model-mesh-mlserver-adapter/server/config.go +++ b/model-mesh-mlserver-adapter/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-mlserver-adapter/server/server.go b/model-mesh-mlserver-adapter/server/server.go index 5fc499f0..57047f94 100644 --- a/model-mesh-mlserver-adapter/server/server.go +++ b/model-mesh-mlserver-adapter/server/server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-mlserver-adapter/server/server_test.go b/model-mesh-mlserver-adapter/server/server_test.go index 0e1d3726..30f328ea 100644 --- a/model-mesh-mlserver-adapter/server/server_test.go +++ b/model-mesh-mlserver-adapter/server/server_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/main.go b/model-mesh-ovms-adapter/main.go index 92f48f6f..f42ba87b 100644 --- a/model-mesh-ovms-adapter/main.go +++ b/model-mesh-ovms-adapter/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-ovms-adapter/server/adaptmodellayout.go b/model-mesh-ovms-adapter/server/adaptmodellayout.go index 09d6a0eb..8a76b3fa 100644 --- a/model-mesh-ovms-adapter/server/adaptmodellayout.go +++ b/model-mesh-ovms-adapter/server/adaptmodellayout.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/adaptmodellayout_test.go b/model-mesh-ovms-adapter/server/adaptmodellayout_test.go index 3d750027..f0380c41 100644 --- a/model-mesh-ovms-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-ovms-adapter/server/adaptmodellayout_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/config.go b/model-mesh-ovms-adapter/server/config.go index d24fd135..bfb226e8 100644 --- a/model-mesh-ovms-adapter/server/config.go +++ b/model-mesh-ovms-adapter/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/const.go b/model-mesh-ovms-adapter/server/const.go index ff0f5bbe..fb72c623 100644 --- a/model-mesh-ovms-adapter/server/const.go +++ b/model-mesh-ovms-adapter/server/const.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server const ( diff --git a/model-mesh-ovms-adapter/server/modelconfig.go b/model-mesh-ovms-adapter/server/modelconfig.go index 9477a36e..cf44c9ca 100644 --- a/model-mesh-ovms-adapter/server/modelconfig.go +++ b/model-mesh-ovms-adapter/server/modelconfig.go @@ -4,16 +4,17 @@ // 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 +// 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. + package server -// Types defining the structure of the OVMS Multi-Model config file +// OvmsMultiModelRepositoryConfig Types defining the structure of the OVMS Multi-Model config file // // Doc: https://github.com/openvinotoolkit/model_server/blob/main/docs/multiple_models_mode.md // JSON Schema: https://github.com/openvinotoolkit/model_server/blob/eab97207fbe9078f83a3f85b468418555b02959a/src/schema.cpp#L28 diff --git a/model-mesh-ovms-adapter/server/modelmanager.go b/model-mesh-ovms-adapter/server/modelmanager.go index 270c70f1..a0715e2a 100644 --- a/model-mesh-ovms-adapter/server/modelmanager.go +++ b/model-mesh-ovms-adapter/server/modelmanager.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/modelmanager_test.go b/model-mesh-ovms-adapter/server/modelmanager_test.go index 2355278a..6d00d5c0 100644 --- a/model-mesh-ovms-adapter/server/modelmanager_test.go +++ b/model-mesh-ovms-adapter/server/modelmanager_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/server.go b/model-mesh-ovms-adapter/server/server.go index 3c7399d8..1cdbe45d 100644 --- a/model-mesh-ovms-adapter/server/server.go +++ b/model-mesh-ovms-adapter/server/server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-ovms-adapter/server/server_test.go b/model-mesh-ovms-adapter/server/server_test.go index 7ef32e7f..ca5fe21b 100644 --- a/model-mesh-ovms-adapter/server/server_test.go +++ b/model-mesh-ovms-adapter/server/server_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-torchserve-adapter/main.go b/model-mesh-torchserve-adapter/main.go index 43c45071..7d949cb7 100644 --- a/model-mesh-torchserve-adapter/main.go +++ b/model-mesh-torchserve-adapter/main.go @@ -11,6 +11,7 @@ // 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. + package main import ( diff --git a/model-mesh-torchserve-adapter/server/config.go b/model-mesh-torchserve-adapter/server/config.go index 1af6d858..b3647475 100644 --- a/model-mesh-torchserve-adapter/server/config.go +++ b/model-mesh-torchserve-adapter/server/config.go @@ -11,6 +11,7 @@ // 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. + package server import ( diff --git a/model-mesh-torchserve-adapter/server/server.go b/model-mesh-torchserve-adapter/server/server.go index 45bccdd6..2070d61a 100644 --- a/model-mesh-torchserve-adapter/server/server.go +++ b/model-mesh-torchserve-adapter/server/server.go @@ -11,6 +11,7 @@ // 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. + package server import ( diff --git a/model-mesh-torchserve-adapter/server/server_test.go b/model-mesh-torchserve-adapter/server/server_test.go index f8ffb4cf..1dff207e 100644 --- a/model-mesh-torchserve-adapter/server/server_test.go +++ b/model-mesh-torchserve-adapter/server/server_test.go @@ -11,6 +11,7 @@ // 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. + package server import ( diff --git a/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go b/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go index 9cf2e4d1..4a59a19a 100644 --- a/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go +++ b/model-mesh-torchserve-adapter/torchserve/mock_torchserve_server.go @@ -11,6 +11,7 @@ // 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. + package main import ( diff --git a/model-mesh-triton-adapter/main.go b/model-mesh-triton-adapter/main.go index 8391fd66..889c284d 100644 --- a/model-mesh-triton-adapter/main.go +++ b/model-mesh-triton-adapter/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-triton-adapter/server/adaptmodellayout.go b/model-mesh-triton-adapter/server/adaptmodellayout.go index 643a212d..b7394cfe 100644 --- a/model-mesh-triton-adapter/server/adaptmodellayout.go +++ b/model-mesh-triton-adapter/server/adaptmodellayout.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/adaptmodellayout_test.go b/model-mesh-triton-adapter/server/adaptmodellayout_test.go index c077440d..a3c2e3b1 100644 --- a/model-mesh-triton-adapter/server/adaptmodellayout_test.go +++ b/model-mesh-triton-adapter/server/adaptmodellayout_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/config.go b/model-mesh-triton-adapter/server/config.go index 1fa136aa..c8764147 100644 --- a/model-mesh-triton-adapter/server/config.go +++ b/model-mesh-triton-adapter/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/const.go b/model-mesh-triton-adapter/server/const.go index c7e3b768..b41ec6db 100644 --- a/model-mesh-triton-adapter/server/const.go +++ b/model-mesh-triton-adapter/server/const.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server const ( diff --git a/model-mesh-triton-adapter/server/schema.go b/model-mesh-triton-adapter/server/schema.go index da459e88..fd5240ca 100644 --- a/model-mesh-triton-adapter/server/schema.go +++ b/model-mesh-triton-adapter/server/schema.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server // Refer to this proto file for schema and supported data types diff --git a/model-mesh-triton-adapter/server/schema_test.go b/model-mesh-triton-adapter/server/schema_test.go index 8f6959d7..f3d17be4 100644 --- a/model-mesh-triton-adapter/server/schema_test.go +++ b/model-mesh-triton-adapter/server/schema_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/server.go b/model-mesh-triton-adapter/server/server.go index 6b831f14..0297e8dc 100644 --- a/model-mesh-triton-adapter/server/server.go +++ b/model-mesh-triton-adapter/server/server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/server_test.go b/model-mesh-triton-adapter/server/server_test.go index 9434ed70..bea4bd50 100644 --- a/model-mesh-triton-adapter/server/server_test.go +++ b/model-mesh-triton-adapter/server/server_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/server/utils.go b/model-mesh-triton-adapter/server/utils.go index 111b4834..4ef3e859 100644 --- a/model-mesh-triton-adapter/server/utils.go +++ b/model-mesh-triton-adapter/server/utils.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go b/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go index 079428bc..e7f7f7e8 100644 --- a/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go +++ b/model-mesh-triton-adapter/triton/adapter_client/adapter_client.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go b/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go index ab0c27b3..4ce75e54 100644 --- a/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go +++ b/model-mesh-triton-adapter/triton/mesh_client/mesh_client.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-mesh-triton-adapter/triton/mock_triton_server.go b/model-mesh-triton-adapter/triton/mock_triton_server.go index a9ba2b4b..bafb4728 100644 --- a/model-mesh-triton-adapter/triton/mock_triton_server.go +++ b/model-mesh-triton-adapter/triton/mock_triton_server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-serving-puller/main.go b/model-serving-puller/main.go index 487b021e..ca9b26d5 100644 --- a/model-serving-puller/main.go +++ b/model-serving-puller/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/model-serving-puller/puller/config.go b/model-serving-puller/puller/config.go index 2af39601..0901c753 100644 --- a/model-serving-puller/puller/config.go +++ b/model-serving-puller/puller/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/puller/dotpath.go b/model-serving-puller/puller/dotpath.go index 42329d15..a9f0b1c6 100644 --- a/model-serving-puller/puller/dotpath.go +++ b/model-serving-puller/puller/dotpath.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/puller/dotpath_test.go b/model-serving-puller/puller/dotpath_test.go index 7441b913..217ae543 100644 --- a/model-serving-puller/puller/dotpath_test.go +++ b/model-serving-puller/puller/dotpath_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/puller/puller.go b/model-serving-puller/puller/puller.go index 89481e91..aaaaa31b 100644 --- a/model-serving-puller/puller/puller.go +++ b/model-serving-puller/puller/puller.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( @@ -57,8 +58,7 @@ type Puller struct { } // PullerInterface is the interface for `pullman` -// -// useful to mock for testing +// useful to mock for testing type PullerInterface interface { Pull(context.Context, pullman.PullCommand) error } diff --git a/model-serving-puller/puller/puller_test.go b/model-serving-puller/puller/puller_test.go index 5d86a4ff..7d3059c3 100644 --- a/model-serving-puller/puller/puller_test.go +++ b/model-serving-puller/puller/puller_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package puller import ( diff --git a/model-serving-puller/server/config.go b/model-serving-puller/server/config.go index aa8c4797..dbfd71c8 100644 --- a/model-serving-puller/server/config.go +++ b/model-serving-puller/server/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-serving-puller/server/modelstate.go b/model-serving-puller/server/modelstate.go index 68b601a8..99b7e1f5 100644 --- a/model-serving-puller/server/modelstate.go +++ b/model-serving-puller/server/modelstate.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-serving-puller/server/modelstate_test.go b/model-serving-puller/server/modelstate_test.go index ada5a067..989433ff 100644 --- a/model-serving-puller/server/modelstate_test.go +++ b/model-serving-puller/server/modelstate_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/model-serving-puller/server/server.go b/model-serving-puller/server/server.go index d3b97026..1421de61 100644 --- a/model-serving-puller/server/server.go +++ b/model-serving-puller/server/server.go @@ -4,13 +4,14 @@ // 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 +// 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. + package server import ( diff --git a/pullman/cache.go b/pullman/cache.go index d6573450..ac75624a 100644 --- a/pullman/cache.go +++ b/pullman/cache.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/cache_test.go b/pullman/cache_test.go index 9d49a6af..8d9cd33b 100644 --- a/pullman/cache_test.go +++ b/pullman/cache_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/cmd/main.go b/pullman/cmd/main.go index ff6fc6ba..1198a3aa 100644 --- a/pullman/cmd/main.go +++ b/pullman/cmd/main.go @@ -4,13 +4,14 @@ // 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 +// 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. + package main import ( diff --git a/pullman/config.go b/pullman/config.go index 909a74b0..1dbc9847 100644 --- a/pullman/config.go +++ b/pullman/config.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/config_test.go b/pullman/config_test.go index 006166b1..5e909198 100644 --- a/pullman/config_test.go +++ b/pullman/config_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/helpers.go b/pullman/helpers.go index 85d53428..645b7538 100644 --- a/pullman/helpers.go +++ b/pullman/helpers.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/pullman.go b/pullman/pullman.go index 51369c16..88bce887 100644 --- a/pullman/pullman.go +++ b/pullman/pullman.go @@ -1,16 +1,17 @@ -// Copyright 2021 IBM Corporation +// Copyright 2023 IBM Corporation // // 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 +// 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. + package pullman import ( diff --git a/pullman/pullman_test.go b/pullman/pullman_test.go index a647e263..45ae2fec 100644 --- a/pullman/pullman_test.go +++ b/pullman/pullman_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package pullman import ( diff --git a/pullman/storageproviders/azure/downloader.go b/pullman/storageproviders/azure/downloader.go index 6a38595d..4fea2c60 100644 --- a/pullman/storageproviders/azure/downloader.go +++ b/pullman/storageproviders/azure/downloader.go @@ -4,13 +4,14 @@ // 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 +// 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. + package azureprovider import ( diff --git a/pullman/storageproviders/azure/provider.go b/pullman/storageproviders/azure/provider.go index 92bd721b..34493410 100644 --- a/pullman/storageproviders/azure/provider.go +++ b/pullman/storageproviders/azure/provider.go @@ -4,13 +4,14 @@ // 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 +// 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. + package azureprovider import ( diff --git a/pullman/storageproviders/azure/provider_test.go b/pullman/storageproviders/azure/provider_test.go index ce327e6b..916b5ef3 100644 --- a/pullman/storageproviders/azure/provider_test.go +++ b/pullman/storageproviders/azure/provider_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package azureprovider import ( diff --git a/pullman/storageproviders/gcs/downloader.go b/pullman/storageproviders/gcs/downloader.go index d9ebb631..60e6686e 100644 --- a/pullman/storageproviders/gcs/downloader.go +++ b/pullman/storageproviders/gcs/downloader.go @@ -4,13 +4,14 @@ // 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 +// 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. + package gcsprovider import ( diff --git a/pullman/storageproviders/gcs/provider.go b/pullman/storageproviders/gcs/provider.go index 69cbaead..daae29fe 100644 --- a/pullman/storageproviders/gcs/provider.go +++ b/pullman/storageproviders/gcs/provider.go @@ -4,13 +4,14 @@ // 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 +// 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. + package gcsprovider import ( diff --git a/pullman/storageproviders/gcs/provider_test.go b/pullman/storageproviders/gcs/provider_test.go index b113b714..c5b2351a 100644 --- a/pullman/storageproviders/gcs/provider_test.go +++ b/pullman/storageproviders/gcs/provider_test.go @@ -4,13 +4,14 @@ // 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 +// 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. + package gcsprovider import ( diff --git a/pullman/storageproviders/http/downloader.go b/pullman/storageproviders/http/downloader.go index dc3332cf..3625679f 100644 --- a/pullman/storageproviders/http/downloader.go +++ b/pullman/storageproviders/http/downloader.go @@ -4,13 +4,14 @@ // 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 +// 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. + package httpprovider import ( diff --git a/scripts/add_headers.sh b/scripts/add_headers.sh new file mode 100755 index 00000000..4a44f73c --- /dev/null +++ b/scripts/add_headers.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Copyright 2023 IBM Corporation +# +# 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. + +if ! hash addlicense 2>/dev/null; then + go install github.com/google/addlicense@latest + # make sure we can actually use the newly install addlicense script + if ! command -v addlicense >/dev/null 2>&1; then + echo "Can not find 'addlicense' after running 'go install github.com/google/addlicense'." + echo "GOPATH=$GOPATH" + echo 'Did you forget to export PATH=$PATH:$GOPATH/bin' + exit 1 + fi +fi + +for file in $(find . -type f -name "*.go"); do + sed -i.bak \ + -e '/\/\/ limitations under the License\.$/{' \ + -e 'N' \ + -e 's/\(\/\/ limitations under the License.\)\n\(package\)/\1\n\n\2/;}' \ + $file + rm -rf ${file}.bak +done + +# add license to new files that does not contains it +shopt -s globstar +addlicense -v -c "IBM Corporation" -l=apache Dockerfile ./**/*.go scripts +