Skip to content

Commit 5a3e4a3

Browse files
committed
chore: updating to v2
1 parent f374447 commit 5a3e4a3

14 files changed

+17
-23
lines changed

access_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package restrict
33

44
import (
55
"fmt"
6-
"github.com/el-mike/restrict/internal/utils"
6+
"github.com/el-mike/restrict/v2/internal/utils"
77
)
88

99
// AccessManager - an entity responsible for checking the authorization. It uses underlying

adapters/file_adapter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package adapters
22

33
import (
4-
"github.com/el-mike/restrict"
4+
"github.com/el-mike/restrict/v2"
55
)
66

77
// AllowedFileType - alias type for describing allowed file types.

adapters/file_adapter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"errors"
55
"testing"
66

7-
"github.com/el-mike/restrict"
7+
"github.com/el-mike/restrict/v2"
88
"github.com/stretchr/testify/assert"
99
"github.com/stretchr/testify/mock"
1010
"github.com/stretchr/testify/suite"

adapters/in_memory_adapter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package adapters
22

3-
import "github.com/el-mike/restrict"
3+
import "github.com/el-mike/restrict/v2"
44

55
// InMemoryAdapter - StorageAdapter implementation, providing in-memory persistence.
66
type InMemoryAdapter struct {

adapters/mocks_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package adapters
33
import (
44
"fmt"
55

6-
"github.com/el-mike/restrict"
6+
"github.com/el-mike/restrict/v2"
77
)
88

99
const (

authorization_errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package restrict
22

33
import (
44
"fmt"
5-
"github.com/el-mike/restrict/internal/utils"
5+
"github.com/el-mike/restrict/v2/internal/utils"
66
"strings"
77
)
88

go.mod

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
module github.com/el-mike/restrict
1+
module github.com/el-mike/restrict/v2
22

33
go 1.15
44

55
require (
66
github.com/stretchr/testify v1.9.0
77
gopkg.in/yaml.v3 v3.0.1
88
)
9-
10-
require (
11-
github.com/davecgh/go-spew v1.1.1 // indirect
12-
github.com/pmezard/go-difflib v1.0.0 // indirect
13-
github.com/stretchr/objx v0.5.2 // indirect
14-
)

internal/examples/basic_usage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/el-mike/restrict"
8-
"github.com/el-mike/restrict/adapters"
7+
"github.com/el-mike/restrict/v2"
8+
"github.com/el-mike/restrict/v2/adapters"
99
)
1010

1111
var basicUsagePolicy = &restrict.PolicyDefinition{

internal/examples/error_handling_example.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/el-mike/restrict"
8-
"github.com/el-mike/restrict/adapters"
7+
"github.com/el-mike/restrict/v2"
8+
"github.com/el-mike/restrict/v2/adapters"
99
)
1010

1111
var errorHandlingExamplePolicy = &restrict.PolicyDefinition{

internal/examples/policy_example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package examples
22

3-
import "github.com/el-mike/restrict"
3+
import "github.com/el-mike/restrict/v2"
44

55
var ExamplePolicy = &restrict.PolicyDefinition{
66
// A map of reusable Permissions. Key corresponds to a preset's name, which can

0 commit comments

Comments
 (0)