Fix golangci-lint findings
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
parent
1e3cd5b052
commit
161abf8f5b
@ -124,7 +124,7 @@ func WithMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*ru
|
|||||||
criMounts = config.GetMounts()
|
criMounts = config.GetMounts()
|
||||||
mounts = append([]*runtime.Mount{}, criMounts...)
|
mounts = append([]*runtime.Mount{}, criMounts...)
|
||||||
)
|
)
|
||||||
// Copy all mounts from extra mounts, except for mounts overriden by CRI.
|
// Copy all mounts from extra mounts, except for mounts overridden by CRI.
|
||||||
for _, e := range extra {
|
for _, e := range extra {
|
||||||
found := false
|
found := false
|
||||||
for _, c := range criMounts {
|
for _, c := range criMounts {
|
||||||
@ -151,7 +151,7 @@ func WithMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*ru
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Copy all mounts from default mounts, except for
|
// Copy all mounts from default mounts, except for
|
||||||
// - mounts overriden by supplied mount;
|
// - mounts overridden by supplied mount;
|
||||||
// - all mounts under /dev if a supplied /dev is present.
|
// - all mounts under /dev if a supplied /dev is present.
|
||||||
mountSet := make(map[string]struct{})
|
mountSet := make(map[string]struct{})
|
||||||
for _, m := range mounts {
|
for _, m := range mounts {
|
||||||
@ -202,7 +202,7 @@ func WithMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*ru
|
|||||||
switch mount.GetPropagation() {
|
switch mount.GetPropagation() {
|
||||||
case runtime.MountPropagation_PROPAGATION_PRIVATE:
|
case runtime.MountPropagation_PROPAGATION_PRIVATE:
|
||||||
options = append(options, "rprivate")
|
options = append(options, "rprivate")
|
||||||
// Since default root propogation in runc is rprivate ignore
|
// Since default root propagation in runc is rprivate ignore
|
||||||
// setting the root propagation
|
// setting the root propagation
|
||||||
case runtime.MountPropagation_PROPAGATION_BIDIRECTIONAL:
|
case runtime.MountPropagation_PROPAGATION_BIDIRECTIONAL:
|
||||||
if err := ensureShared(src, osi.(osinterface.UNIX).LookupMount); err != nil {
|
if err := ensureShared(src, osi.(osinterface.UNIX).LookupMount); err != nil {
|
||||||
|
@ -58,7 +58,7 @@ func WithWindowsMounts(osi osinterface.OS, config *runtime.ContainerConfig, extr
|
|||||||
criMounts = config.GetMounts()
|
criMounts = config.GetMounts()
|
||||||
mounts = append([]*runtime.Mount{}, criMounts...)
|
mounts = append([]*runtime.Mount{}, criMounts...)
|
||||||
)
|
)
|
||||||
// Copy all mounts from extra mounts, except for mounts overriden by CRI.
|
// Copy all mounts from extra mounts, except for mounts overridden by CRI.
|
||||||
for _, e := range extra {
|
for _, e := range extra {
|
||||||
found := false
|
found := false
|
||||||
for _, c := range criMounts {
|
for _, c := range criMounts {
|
||||||
@ -77,7 +77,7 @@ func WithWindowsMounts(osi osinterface.OS, config *runtime.ContainerConfig, extr
|
|||||||
sort.Sort(orderedMounts(mounts))
|
sort.Sort(orderedMounts(mounts))
|
||||||
|
|
||||||
// Copy all mounts from default mounts, except for
|
// Copy all mounts from default mounts, except for
|
||||||
// - mounts overriden by supplied mount;
|
// - mounts overridden by supplied mount;
|
||||||
// - all mounts under /dev if a supplied /dev is present.
|
// - all mounts under /dev if a supplied /dev is present.
|
||||||
mountSet := make(map[string]struct{})
|
mountSet := make(map[string]struct{})
|
||||||
for _, m := range mounts {
|
for _, m := range mounts {
|
||||||
|
@ -33,7 +33,7 @@ func NewNetNS() (*NetNS, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return &NetNS{path: string(hcnNamespace.Id)}, nil
|
return &NetNS{path: hcnNamespace.Id}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadNetNS loads existing network namespace.
|
// LoadNetNS loads existing network namespace.
|
||||||
|
Loading…
Reference in New Issue
Block a user