From 7851aac4cf4e404bd8c25cc8462ad99aa704802a Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 18 Apr 2024 14:27:54 +0200 Subject: [PATCH] Allow lint to function on darwin Signed-off-by: Evan Lezar --- .../{restart.go => restart_linux.go} | 0 internal/containerd/restart_other.go | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+) rename internal/containerd/{restart.go => restart_linux.go} (100%) create mode 100644 internal/containerd/restart_other.go diff --git a/internal/containerd/restart.go b/internal/containerd/restart_linux.go similarity index 100% rename from internal/containerd/restart.go rename to internal/containerd/restart_linux.go diff --git a/internal/containerd/restart_other.go b/internal/containerd/restart_other.go new file mode 100644 index 00000000..168dc36f --- /dev/null +++ b/internal/containerd/restart_other.go @@ -0,0 +1,27 @@ +//go:build !linux +// +build !linux + +/** +# Copyright 2024 NVIDIA 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. +**/ + +package containerd + +import "fmt" + +// RestartContainerd is not supported on non-linux platforms. +func RestartContainerd(string) error { + return fmt.Errorf("RestartContainerd is not supported on non-linux platforms") +}