mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +00:00
virtcontainer: sconstification of constifiable vars
Fixes #142 Signed-off-by: zhangjie <iamkadisi@163.com>
This commit is contained in:
parent
4f102f8e8f
commit
2d65499d03
@ -21,7 +21,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// bind/unbind paths to aid in SRIOV VF bring-up/restore
|
// bind/unbind paths to aid in SRIOV VF bring-up/restore
|
||||||
var (
|
const (
|
||||||
pciDriverUnbindPath = "/sys/bus/pci/devices/%s/driver/unbind"
|
pciDriverUnbindPath = "/sys/bus/pci/devices/%s/driver/unbind"
|
||||||
pciDriverBindPath = "/sys/bus/pci/drivers/%s/bind"
|
pciDriverBindPath = "/sys/bus/pci/drivers/%s/bind"
|
||||||
vfioNewIDPath = "/sys/bus/pci/drivers/vfio-pci/new_id"
|
vfioNewIDPath = "/sys/bus/pci/drivers/vfio-pci/new_id"
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
"github.com/kata-containers/runtime/virtcontainers/pkg/mock"
|
"github.com/kata-containers/runtime/virtcontainers/pkg/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
const (
|
||||||
testKataProxyURLTempl = "unix://%s/kata-proxy-test.sock"
|
testKataProxyURLTempl = "unix://%s/kata-proxy-test.sock"
|
||||||
testBlockDeviceCtrPath = "testBlockDeviceCtrPath"
|
testBlockDeviceCtrPath = "testBlockDeviceCtrPath"
|
||||||
testPCIAddr = "04/02"
|
testPCIAddr = "04/02"
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
const (
|
||||||
testRunningProcess = "sleep"
|
testRunningProcess = "sleep"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ package virtcontainers
|
|||||||
type ContainerType string
|
type ContainerType string
|
||||||
|
|
||||||
// List different types of containers
|
// List different types of containers
|
||||||
var (
|
const (
|
||||||
PodContainer ContainerType = "pod_container"
|
PodContainer ContainerType = "pod_container"
|
||||||
PodSandbox ContainerType = "pod_sandbox"
|
PodSandbox ContainerType = "pod_sandbox"
|
||||||
UnknownContainerType ContainerType = "unknown_container_type"
|
UnknownContainerType ContainerType = "unknown_container_type"
|
||||||
|
Loading…
Reference in New Issue
Block a user