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:
Kyle Carberry
2023-08-18 13:55:43 -05:00
committed by GitHub
parent 0d40e7fe24
commit 22e781eced
626 changed files with 5834 additions and 5834 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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"})

View File

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

View File

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

View File

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

View File

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