Skip to content

Commit b554bc1

Browse files
committed
fix linter findings
- wrong import order - omit type func() from declaration of var - proper declaration of seLevel - remove unused var selinuxEnabled Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org>
1 parent f224d19 commit b554bc1

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

cmd/incusd/main_forkqemu.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"strings"
1111

1212
goselinux "github.com/opencontainers/selinux/go-selinux"
13-
1413
"github.com/spf13/cobra"
1514
"golang.org/x/sys/unix"
1615
)

internal/server/selinux/instance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func InstanceContext(s *sys.OS, instType instancetype.Type, localConfig map[stri
2323
return "", false, nil, nil
2424
}
2525

26-
var release func() = func() {}
26+
var release = func() {}
2727

2828
daemonCtx, err := goselinux.NewContext(s.SELinuxContextDaemon)
2929
if err != nil {
@@ -44,7 +44,7 @@ func InstanceContext(s *sys.OS, instType instancetype.Type, localConfig map[stri
4444
}
4545

4646
// Resolve MCS level: explicit override -> cached volatile -> auto-generated.
47-
seLevel := "s0"
47+
var seLevel string
4848

4949
if cl := localConfig["security.selinux.level"]; cl != "" {
5050
// Explicit override (user provides full level, e.g. "s0:c100,c200").

shared/subprocess/proc.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@ import (
99
"io"
1010
"os"
1111
"os/exec"
12-
"sync/atomic"
1312
"syscall"
1413

1514
"go.yaml.in/yaml/v4"
1615

1716
"github.com/lxc/incus/v7/shared/util"
1817
)
1918

20-
var selinuxEnabled atomic.Bool
21-
2219
// Process struct. Has ability to set runtime arguments.
2320
type Process struct {
2421
exitCode int64

0 commit comments

Comments
 (0)