chore: use slices from standard library.

This commit is contained in:
Alexandre Pujol 2024-04-12 20:07:05 +01:00
parent 8b68132f0e
commit ea1736083a
Failed to generate hash of commit
12 changed files with 13 additions and 15 deletions

View file

@ -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]

View file

@ -5,9 +5,9 @@
package aa
import (
"slices"
"strings"
"golang.org/x/exp/slices"
)
)
type MountConditions struct {

View file

@ -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/.

View file

@ -9,9 +9,8 @@ package aa
import (
"regexp"
"slices"
"strings"
"golang.org/x/exp/slices"
)
var (

View file

@ -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

View file

@ -6,10 +6,10 @@ package builder
import (
"regexp"
"slices"
"strings"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
"golang.org/x/exp/slices"
)
var (

View file

@ -5,9 +5,8 @@
package builder
import (
"slices"
"testing"
"golang.org/x/exp/slices"
)
func TestBuilder_Apply(t *testing.T) {

View file

@ -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 {

View file

@ -6,10 +6,10 @@ package cfg
import (
"os"
"slices"
"strings"
"github.com/arduino/go-paths-helper"
"golang.org/x/exp/slices"
)
var (

View file

@ -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 {

View file

@ -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 {

View file

@ -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() {