Skip to content

Commit

Permalink
Include package version into the import path (#158)
Browse files Browse the repository at this point in the history
Co-authored-by: Voloshina Tatyana <voloshina@selectel.ru>
  • Loading branch information
T-Sh and Voloshina Tatyana authored Dec 14, 2022
1 parent 67d4221 commit 6943a1d
Show file tree
Hide file tree
Showing 51 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/selectel/go-selvpcclient
module github.com/selectel/go-selvpcclient/v2

go 1.14

Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/quotamanager/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"unicode"

"github.com/selectel/go-selvpcclient/selvpcclient/resell"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell"
)

var errServiceResponse = errors.New("status code from the server")
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/quotamanager/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack/identity/v3/tokens"

"github.com/selectel/go-selvpcclient/selvpcclient"
reselTokens "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/tokens"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
reselTokens "github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/tokens"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/quotamanager/quotas/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"net/http"

"github.com/selectel/go-selvpcclient/selvpcclient/quotamanager"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/quotamanager"
)

// GetLimits returns limits for a single project referenced by id in specific region.
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/quotamanager/quotas/testing/fixtures.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package testing

import (
"github.com/selectel/go-selvpcclient/selvpcclient/quotamanager/quotas"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/quotamanager/quotas"
)

// TestGetLimitsQuotasResponseRaw represents a raw response from the GetAll request.
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/quotamanager/quotas/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/quotamanager/quotas"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/quotamanager/quotas"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/resell.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package resell

import "github.com/selectel/go-selvpcclient/selvpcclient"
import "github.com/selectel/go-selvpcclient/v2/selvpcclient"

const (
// ServiceType contains the name of the Selectel VPC service for which this
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/capabilities/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "capabilities"
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/capabilities/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/capabilities"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/capabilities"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

func TestGetCapabilities(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package v2
import (
"github.com/gophercloud/gophercloud"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/selvpcclient/resell"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell"
)

// APIVersion sets the version of the Resell client.
Expand Down
6 changes: 3 additions & 3 deletions selvpcclient/resell/v2/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

"github.com/gophercloud/gophercloud/testhelper"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/selvpcclient/resell"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/floatingips/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "floatingips"
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/floatingips/schemas.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package floatingips

import "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/servers"
import "github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/servers"

// FloatingIP represents a single Resell Floating IP.
type FloatingIP struct {
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/floatingips/testing/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package testing
import (
"time"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/floatingips"
"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/servers"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/floatingips"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/servers"
)

// TestGetFloatingIPResponseRaw represents a raw response from the Get request.
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/floatingips/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/floatingips"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/floatingips"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

func TestGetFloatingIP(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/keypairs/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "keypairs"
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/keypairs/testing/fixtures.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package testing

import "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/keypairs"
import "github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/keypairs"

// TestListResponseRaw represents a raw response from List requests.
const TestListResponseRaw = `
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/keypairs/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/keypairs"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/keypairs"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

func TestListKeypairs(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/licenses/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "licenses"
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/licenses/schemas.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package licenses

import "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/servers"
import "github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/servers"

// License represents a single Resell License.
type License struct {
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/licenses/testing/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package testing
import (
"time"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/licenses"
"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/servers"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/licenses"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/servers"
)

// TestGetLicenseResponseRaw represents a raw response from the Get request.
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/licenses/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/licenses"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/licenses"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

func TestGetLicense(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/projects/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "projects"
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/projects/testing/fixtures.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package testing

import (
"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/projects"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/projects"
)

// TestGetProjectResponseRaw represents a raw response from the Get request.
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/projects/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/projects"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/projects"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

func TestGetProject(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/roles/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "roles"
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/roles/testing/fixtures.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package testing

import "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/roles"
import "github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/roles"

// TestListResponseRaw represents a raw response from List requests.
const TestListResponseRaw = `
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/roles/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/roles"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/roles"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

func TestListRoles(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/subnets/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "subnets"
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/subnets/requests_opts.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package subnets

import "github.com/selectel/go-selvpcclient/selvpcclient"
import "github.com/selectel/go-selvpcclient/v2/selvpcclient"

// SubnetOpts represents options for the subnets Create request.
type SubnetOpts struct {
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/subnets/schemas.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package subnets

import "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/servers"
import "github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/servers"

// Subnet represents a single Resell subnet.
type Subnet struct {
Expand Down
6 changes: 3 additions & 3 deletions selvpcclient/resell/v2/subnets/testing/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package testing
import (
"time"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/servers"
"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/subnets"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/servers"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/subnets"
)

// TestGetSubnetResponseRaw represents a raw response from the Get request.
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/subnets/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/subnets"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/subnets"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

func TestGetSubnet(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/tokens/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "tokens"
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/tokens/testing/fixtures.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package testing

import "github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/tokens"
import "github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/tokens"

// TestCreateTokenOptsRaw represents marshalled options for the Create request.
const TestCreateTokenOptsRaw = `
Expand Down
4 changes: 2 additions & 2 deletions selvpcclient/resell/v2/tokens/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"testing"

"github.com/selectel/go-selvpcclient/selvpcclient/resell/v2/tokens"
"github.com/selectel/go-selvpcclient/selvpcclient/testutils"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/resell/v2/tokens"
"github.com/selectel/go-selvpcclient/v2/selvpcclient/testutils"
)

func TestCreateToken(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/resell/v2/traffic/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strings"

"github.com/selectel/go-selvpcclient/selvpcclient"
"github.com/selectel/go-selvpcclient/v2/selvpcclient"
)

const resourceURL = "traffic"
Expand Down
Loading

0 comments on commit 6943a1d

Please sign in to comment.