Move builtins_*.go to cmd/containerd/builtins to make the files reusable

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato 2022-06-21 15:52:36 +00:00
parent 813780e443
commit 17f9c3a0ef
13 changed files with 18 additions and 32 deletions

View File

@ -23,6 +23,11 @@ issues:
max-issues-per-linter: 0
max-same-issues: 0
# Only using / doesn't work due to https://github.com/golangci/golangci-lint/issues/1398.
exclude-rules:
- path: 'cmd[\\/]containerd[\\/]builtins[\\/]'
text: "blank-imports:"
linters-settings:
gosec:
# The following issues surfaced when `gosec` linter

View File

@ -17,6 +17,6 @@
limitations under the License.
*/
package main
package builtins
import _ "github.com/containerd/aufs/plugin"

View File

@ -17,6 +17,6 @@
limitations under the License.
*/
package main
package builtins
import _ "github.com/containerd/containerd/snapshots/btrfs/plugin"

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package main
package builtins
// register containerd builtins here
import (

View File

@ -14,6 +14,6 @@
limitations under the License.
*/
package main
package builtins
import _ "github.com/containerd/zfs/plugin"

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package main
package builtins
import (
_ "github.com/containerd/containerd/metrics/cgroups"

View File

@ -17,7 +17,7 @@
limitations under the License.
*/
package main
package builtins
import (
_ "github.com/containerd/containerd/snapshots/native/plugin"

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package main
package builtins
import (
_ "github.com/containerd/containerd/diff/lcow"

View File

@ -17,6 +17,6 @@
limitations under the License.
*/
package main
package builtins
import _ "github.com/containerd/containerd/snapshots/devmapper/plugin"

View File

@ -17,7 +17,7 @@
limitations under the License.
*/
package main
package builtins
import (
_ "github.com/containerd/containerd/tracing/plugin"

View File

@ -17,6 +17,6 @@
limitations under the License.
*/
package main
package builtins
import _ "github.com/containerd/zfs/plugin"

View File

@ -1,22 +0,0 @@
//go:build (linux && !no_cri) || (windows && !no_cri) || (darwin && !no_cri)
// +build linux,!no_cri windows,!no_cri darwin,!no_cri
/*
Copyright The containerd Authors.
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 main
import _ "github.com/containerd/containerd/pkg/cri"

View File

@ -22,6 +22,9 @@ import (
"github.com/containerd/containerd/cmd/containerd/command"
"github.com/containerd/containerd/pkg/seed"
_ "github.com/containerd/containerd/cmd/containerd/builtins"
_ "github.com/containerd/containerd/pkg/cri"
)
func init() {