mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: add /v2 to import module path (#9072)
* chore: add /v2 to import module path go mod requires semantic versioning with versions greater than 1.x This was a mechanical update by running: ``` go install github.com/marwan-at-work/mod/cmd/mod@latest mod upgrade ``` Migrate generated files to import /v2 * Fix gen
This commit is contained in:
@ -18,10 +18,10 @@ import (
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac/regosql"
|
||||
"github.com/coder/coder/coderd/rbac/regosql/sqltypes"
|
||||
"github.com/coder/coder/coderd/tracing"
|
||||
"github.com/coder/coder/coderd/util/slice"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql/sqltypes"
|
||||
"github.com/coder/coder/v2/coderd/tracing"
|
||||
"github.com/coder/coder/v2/coderd/util/slice"
|
||||
)
|
||||
|
||||
// Action represents the allowed actions to be done on an object.
|
||||
|
@ -13,8 +13,8 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac/regosql"
|
||||
"github.com/coder/coder/testutil"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql"
|
||||
"github.com/coder/coder/v2/testutil"
|
||||
)
|
||||
|
||||
type fakeObject struct {
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/coderd/coderdtest"
|
||||
"github.com/coder/coder/coderd/rbac"
|
||||
"github.com/coder/coder/v2/coderd/coderdtest"
|
||||
"github.com/coder/coder/v2/coderd/rbac"
|
||||
)
|
||||
|
||||
type benchmarkCase struct {
|
||||
|
@ -3,7 +3,7 @@ package rbac_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac"
|
||||
"github.com/coder/coder/v2/coderd/rbac"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/xerrors"
|
||||
|
@ -3,8 +3,8 @@ package rbac_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac"
|
||||
"github.com/coder/coder/coderd/util/slice"
|
||||
"github.com/coder/coder/v2/coderd/rbac"
|
||||
"github.com/coder/coder/v2/coderd/util/slice"
|
||||
)
|
||||
|
||||
func TestObjectEqual(t *testing.T) {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/open-policy-agent/opa/ast"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac/regosql/sqltypes"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql/sqltypes"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/open-policy-agent/opa/rego"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac/regosql/sqltypes"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql/sqltypes"
|
||||
)
|
||||
|
||||
// ConvertConfig is required to generate SQL from the rego queries.
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"github.com/open-policy-agent/opa/rego"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac/regosql"
|
||||
"github.com/coder/coder/coderd/rbac/regosql/sqltypes"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql/sqltypes"
|
||||
)
|
||||
|
||||
// TestRegoQueriesNoVariables handles cases without variables. These should be
|
||||
|
@ -1,6 +1,6 @@
|
||||
package regosql
|
||||
|
||||
import "github.com/coder/coder/coderd/rbac/regosql/sqltypes"
|
||||
import "github.com/coder/coder/v2/coderd/rbac/regosql/sqltypes"
|
||||
|
||||
func resourceIDMatcher() sqltypes.VariableMatcher {
|
||||
return sqltypes.StringVarMatcher("id :: text", []string{"input", "object", "id"})
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac/regosql/sqltypes"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql/sqltypes"
|
||||
)
|
||||
|
||||
func TestEquality(t *testing.T) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac/regosql/sqltypes"
|
||||
"github.com/coder/coder/v2/coderd/rbac/regosql/sqltypes"
|
||||
)
|
||||
|
||||
func TestMembership(t *testing.T) {
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac"
|
||||
"github.com/coder/coder/v2/coderd/rbac"
|
||||
)
|
||||
|
||||
type authSubject struct {
|
||||
|
@ -3,7 +3,7 @@ package rbac_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/coder/coder/coderd/rbac"
|
||||
"github.com/coder/coder/v2/coderd/rbac"
|
||||
)
|
||||
|
||||
func TestSubjectEqual(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user