mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-12-23 21:46:44 +01:00
chore: use slices from standard library.
This commit is contained in:
parent
8b68132f0e
commit
ea1736083a
12 changed files with 13 additions and 15 deletions
|
@ -9,10 +9,10 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/roddhjav/apparmor.d/pkg/logs"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
const usage = `aa-log [-h] [--systemd] [--file file] [--rules | --raw] [profile]
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
package aa
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
)
|
||||
|
||||
type MountConditions struct {
|
||||
|
|
|
@ -7,11 +7,11 @@ package aa
|
|||
import (
|
||||
"bytes"
|
||||
"reflect"
|
||||
"slices"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/arduino/go-paths-helper"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
// Default Apparmor magic directory: /etc/apparmor.d/.
|
||||
|
|
|
@ -9,9 +9,8 @@ package aa
|
|||
|
||||
import (
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -7,11 +7,11 @@ package logs
|
|||
import (
|
||||
"io"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/roddhjav/apparmor.d/pkg/aa"
|
||||
"github.com/roddhjav/apparmor.d/pkg/util"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
// Colors
|
||||
|
|
|
@ -6,10 +6,10 @@ package builder
|
|||
|
||||
import (
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
package builder
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
func TestBuilder_Apply(t *testing.T) {
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
package builder
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type Enforce struct {
|
||||
|
|
|
@ -6,10 +6,10 @@ package cfg
|
|||
|
||||
import (
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/arduino/go-paths-helper"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
package directive
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/roddhjav/apparmor.d/pkg/aa"
|
||||
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
|
||||
"github.com/roddhjav/apparmor.d/pkg/util"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type Exec struct {
|
||||
|
|
|
@ -6,10 +6,10 @@ package directive
|
|||
|
||||
import (
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type FilterOnly struct {
|
||||
|
|
|
@ -7,11 +7,11 @@ package prepare
|
|||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"github.com/arduino/go-paths-helper"
|
||||
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
func chdirGitRoot() {
|
||||
|
|
Loading…
Reference in a new issue