chore: use internal paths lib.

This commit is contained in:
Alexandre Pujol 2024-04-28 00:36:16 +01:00
parent f66789d381
commit 926e146dad
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
20 changed files with 25 additions and 20 deletions

7
go.mod
View File

@ -3,6 +3,11 @@ module github.com/roddhjav/apparmor.d
go 1.22
require (
github.com/arduino/go-paths-helper v1.12.0
github.com/stretchr/testify v1.9.0
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
)

View File

@ -11,7 +11,7 @@ import (
"sort"
"strings"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
)
// Default Apparmor magic directory: /etc/apparmor.d/.

View File

@ -9,7 +9,7 @@ import (
"strings"
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
)
func readprofile(path string) string {

View File

@ -4,7 +4,7 @@
package cfg
import "github.com/arduino/go-paths-helper"
import "github.com/roddhjav/apparmor.d/pkg/paths"
var (
// Root is the root directory for the build

View File

@ -8,7 +8,7 @@ import (
"reflect"
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
)
func TestFlagger_Read(t *testing.T) {

View File

@ -9,7 +9,7 @@ import (
"slices"
"strings"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
)
var (

View File

@ -8,7 +8,7 @@ import (
"reflect"
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
)
const (

View File

@ -9,7 +9,7 @@ import (
"regexp"
"strings"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
)

View File

@ -8,7 +8,7 @@ import (
"reflect"
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
)
func TestNewOption(t *testing.T) {

View File

@ -7,7 +7,7 @@ package directive
import (
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
)

View File

@ -7,7 +7,7 @@ package directive
import (
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
)

View File

@ -7,8 +7,8 @@ package prebuild
import (
"strings"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/logging"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/builder"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
"github.com/roddhjav/apparmor.d/pkg/prebuild/directive"

View File

@ -9,7 +9,7 @@ import (
"os/exec"
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/builder"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
"github.com/roddhjav/apparmor.d/pkg/prebuild/prepare"

View File

@ -10,7 +10,7 @@ import (
"slices"
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
)

View File

@ -7,7 +7,7 @@ package prepare
import (
"strings"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
"github.com/roddhjav/apparmor.d/pkg/util"
)

View File

@ -5,7 +5,7 @@
package prepare
import (
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
)

View File

@ -8,7 +8,7 @@ import (
"os"
"path/filepath"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
)

View File

@ -5,7 +5,7 @@
package prepare
import (
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
"github.com/roddhjav/apparmor.d/pkg/util"
)

View File

@ -10,7 +10,7 @@ import (
"slices"
"strings"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
)
var (

View File

@ -9,7 +9,7 @@ import (
"regexp"
"testing"
"github.com/arduino/go-paths-helper"
"github.com/roddhjav/apparmor.d/pkg/paths"
)
func TestDecodeHexInString(t *testing.T) {