Skip to content

Commit

Permalink
Fix codespell warnings
Browse files Browse the repository at this point in the history
./features.go:30: tru ==> through, true
...
./utils_linux.go:147: infront ==> in front

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 177c7d4)
Signed-off-by: lifubang <lifubang@acmcoder.com>
  • Loading branch information
kolyshkin authored and lifubang committed Jun 1, 2024
1 parent a12f444 commit f8f7def
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
16 changes: 8 additions & 8 deletions features.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var featuresCommand = cli.Command{
return err
}

tru := true
t := true

feat := features.Features{
OCIVersionMin: "1.0.0",
Expand All @@ -43,23 +43,23 @@ var featuresCommand = cli.Command{
Namespaces: specconv.KnownNamespaces(),
Capabilities: capabilities.KnownCapabilities(),
Cgroup: &features.Cgroup{
V1: &tru,
V2: &tru,
Systemd: &tru,
SystemdUser: &tru,
V1: &t,
V2: &t,
Systemd: &t,
SystemdUser: &t,
},
Apparmor: &features.Apparmor{
Enabled: &tru,
Enabled: &t,
},
Selinux: &features.Selinux{
Enabled: &tru,
Enabled: &t,
},
},
}

if seccomp.Enabled {
feat.Linux.Seccomp = &features.Seccomp{
Enabled: &tru,
Enabled: &t,
Actions: seccomp.KnownActions(),
Operators: seccomp.KnownOperators(),
Archs: seccomp.KnownArchs(),
Expand Down
5 changes: 2 additions & 3 deletions utils_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ func setupIO(process *libcontainer.Process, rootuid, rootgid int, createTTY, det
return setupProcessPipes(process, rootuid, rootgid)
}

// createPidFile creates a file with the processes pid inside it atomically
// it creates a temp file with the paths filename + '.' infront of it
// then renames the file
// createPidFile creates a file containing the PID,
// doing so atomically (via create and rename).
func createPidFile(path string, process *libcontainer.Process) error {
pid, err := process.Pid()
if err != nil {
Expand Down

0 comments on commit f8f7def

Please sign in to comment.