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

@ -4,7 +4,7 @@ import (
"net/textproto"
"strings"
"github.com/coder/coder/codersdk"
"github.com/coder/coder/v2/codersdk"
)
// StripCoderCookies removes the session token from the cookie header provided.

View File

@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/coder/coder/coderd/httpapi"
"github.com/coder/coder/v2/coderd/httpapi"
)
func TestStripCoderCookies(t *testing.T) {

View File

@ -16,10 +16,10 @@ import (
"github.com/go-playground/validator/v10"
"golang.org/x/xerrors"
"github.com/coder/coder/coderd/database/dbauthz"
"github.com/coder/coder/coderd/rbac"
"github.com/coder/coder/coderd/tracing"
"github.com/coder/coder/codersdk"
"github.com/coder/coder/v2/coderd/database/dbauthz"
"github.com/coder/coder/v2/coderd/rbac"
"github.com/coder/coder/v2/coderd/tracing"
"github.com/coder/coder/v2/codersdk"
)
var Validate *validator.Validate

View File

@ -14,8 +14,8 @@ import (
"github.com/stretchr/testify/require"
"golang.org/x/xerrors"
"github.com/coder/coder/coderd/httpapi"
"github.com/coder/coder/codersdk"
"github.com/coder/coder/v2/coderd/httpapi"
"github.com/coder/coder/v2/codersdk"
)
func TestInternalServerError(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/coder/coder/coderd/httpapi"
"github.com/coder/coder/v2/coderd/httpapi"
)
func TestDuration(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"github.com/moby/moby/pkg/namesgenerator"
"github.com/stretchr/testify/require"
"github.com/coder/coder/coderd/httpapi"
"github.com/coder/coder/v2/coderd/httpapi"
)
func TestUsernameValid(t *testing.T) {

View File

@ -10,8 +10,8 @@ import (
"github.com/google/uuid"
"golang.org/x/xerrors"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/codersdk"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/codersdk"
)
// QueryParamParser is a helper for parsing all query params and gathering all

View File

@ -10,8 +10,8 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/coderd/httpapi"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/httpapi"
)
type queryParamTestCase[T any] struct {

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/coder/coder/coderd/httpapi"
"github.com/coder/coder/v2/coderd/httpapi"
)
func TestApplicationURLString(t *testing.T) {