Skip to content

Commit

Permalink
Merge pull request pathwar#536 from pathwar/dev/moul/change-import-path
Browse files Browse the repository at this point in the history
feat: switch to pathwar.land/pathwar/v2 go import path
  • Loading branch information
moul authored Jun 11, 2020
2 parents 7f0ba05 + 110dd7a commit 86b841a
Show file tree
Hide file tree
Showing 85 changed files with 160 additions and 160 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module pathwar.land/v2
module pathwar.land/pathwar/v2

require (
cloud.google.com/go v0.37.4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GOBINS = ./cmd/pathwar ./cmd/pwinit
DOCKER_IMAGE = pathwar/pathwar
DOCKERFILE_PATH = ../Dockerfile

GO_INSTALL_OPTS = -v -ldflags "-s -w -X pathwar.land/v2/go/pkg/pwversion.Version=`git describe --tags --abbrev` -X pathwar.land/go/pkg/pwversion.Commit=`git rev-parse HEAD` -X pathwar.land/go/pkg/pwversion.Date=`date +%s` -X pathwar.land/go/pkg/pwversion.BuiltBy=makefile"
GO_INSTALL_OPTS = -v -ldflags "-s -w -X pathwar.land/pathwar/v2/go/pkg/pwversion.Version=`git describe --tags --abbrev` -X pathwar.land/go/pkg/pwversion.Commit=`git rev-parse HEAD` -X pathwar.land/go/pkg/pwversion.Date=`date +%s` -X pathwar.land/go/pkg/pwversion.BuiltBy=makefile"
PRE_INSTALL_STEPS += generate
PRE_UNITTEST_STEPS += generate
PRE_TEST_STEPS += generate
Expand Down Expand Up @@ -137,7 +137,7 @@ generate_local:
protoc -I ../vendor/github.com/grpc-ecosystem/grpc-gateway:../api:../vendor:/protobuf --grpc-gateway_out=logtostderr=true:"$(GOPATH)/src" --gogofaster_out="plugins=grpc:$(GOPATH)/src" "$$proto" \
); done
@### custom
sed -i [email protected]/go/[email protected]/v2/go/pkg@ ./pkg/*/*.pb.go
sed -i [email protected]/go/[email protected]/pathwar/v2/go/pkg@ ./pkg/*/*.pb.go
@### end of custom
goimports -w ./pkg ./cmd ./internal
shasum $(GEN_SRC) | sort > gen.sum.tmp
Expand Down
16 changes: 8 additions & 8 deletions go/cmd/pathwar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import (
"golang.org/x/oauth2"
"moul.io/godev"
"moul.io/srand"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwagent"
"pathwar.land/v2/go/pkg/pwapi"
"pathwar.land/v2/go/pkg/pwcompose"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/v2/go/pkg/pwinit"
"pathwar.land/v2/go/pkg/pwsso"
"pathwar.land/v2/go/pkg/pwversion"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwagent"
"pathwar.land/pathwar/v2/go/pkg/pwapi"
"pathwar.land/pathwar/v2/go/pkg/pwcompose"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/pwinit"
"pathwar.land/pathwar/v2/go/pkg/pwsso"
"pathwar.land/pathwar/v2/go/pkg/pwversion"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions go/cmd/pwinit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"syscall"

"github.com/peterbourgon/ff/ffcli"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwinit"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwinit"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go/gen.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/internal/randstring/randstring.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package randstring // import "pathwar.land/v2/go/internal/randstring"
package randstring // import "pathwar.land/pathwar/v2/go/internal/randstring"

import "math/rand"

Expand Down
2 changes: 1 addition & 1 deletion go/internal/testutil/doc.go
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package testutil // import "pathwar.land/v2/go/internal/testutil"
package testutil // import "pathwar.land/pathwar/v2/go/internal/testutil"
2 changes: 1 addition & 1 deletion go/pkg/errcode/doc.go
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package errcode // import "pathwar.land/v2/go/pkg/errcode"
package errcode // import "pathwar.land/pathwar/v2/go/pkg/errcode"
8 changes: 4 additions & 4 deletions go/pkg/pwagent/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/docker/docker/client"
"go.uber.org/zap"
"moul.io/godev"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwapi"
"pathwar.land/v2/go/pkg/pwcompose"
"pathwar.land/v2/go/pkg/pwversion"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwapi"
"pathwar.land/pathwar/v2/go/pkg/pwcompose"
"pathwar.land/pathwar/v2/go/pkg/pwversion"
)

func Daemon(ctx context.Context, cli *client.Client, apiClient *pwapi.HTTPClient, opts Opts) error {
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/pwagent/doc.go
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package pwagent // import "pathwar.land/v2/go/pkg/pwagent"
package pwagent // import "pathwar.land/pathwar/v2/go/pkg/pwagent"
10 changes: 5 additions & 5 deletions go/pkg/pwagent/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"go.uber.org/zap"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwapi"
"pathwar.land/v2/go/pkg/pwcompose"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/v2/go/pkg/pwinit"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwapi"
"pathwar.land/pathwar/v2/go/pkg/pwcompose"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/pwinit"
)

func applyDockerConfig(ctx context.Context, apiInstances *pwapi.AgentListInstances_Output, dockerClient *client.Client, opts Opts) error {
Expand Down
8 changes: 4 additions & 4 deletions go/pkg/pwagent/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"github.com/docker/go-connections/nat"
"github.com/moby/moby/pkg/stdcopy"
"go.uber.org/zap"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwapi"
"pathwar.land/v2/go/pkg/pwcompose"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwapi"
"pathwar.land/pathwar/v2/go/pkg/pwcompose"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func applyNginxConfig(ctx context.Context, apiInstances *pwapi.AgentListInstances_Output, dockerClient *client.Client, opts Opts) error {
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/pwagent/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"time"

"go.uber.org/zap"
"pathwar.land/v2/go/internal/randstring"
"pathwar.land/pathwar/v2/go/internal/randstring"
)

type Opts struct {
Expand Down
8 changes: 4 additions & 4 deletions go/pkg/pwagent/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

"github.com/docker/docker/client"
"go.uber.org/zap"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwapi"
"pathwar.land/v2/go/pkg/pwcompose"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwapi"
"pathwar.land/pathwar/v2/go/pkg/pwcompose"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func updateAPIState(ctx context.Context, apiInstances *pwapi.AgentListInstances_Output, cli *client.Client, apiClient *pwapi.HTTPClient, opts Opts) error {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_admin-challenge-add.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) AdminChallengeAdd(ctx context.Context, in *AdminChallengeAdd_Input) (*AdminChallengeAdd_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_admin-challenge-flavor-add.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) AdminChallengeFlavorAdd(ctx context.Context, in *AdminChallengeFlavorAdd_Input) (*AdminChallengeFlavorAdd_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_admin-challenge-instance-add.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) AdminChallengeInstanceAdd(ctx context.Context, in *AdminChallengeInstanceAdd_Input) (*AdminChallengeInstanceAdd_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_admin-ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) AdminPS(ctx context.Context, in *AdminPS_Input) (*AdminPS_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_admin-redump.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"

"go.uber.org/zap"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) AdminRedump(ctx context.Context, in *AdminRedump_Input) (*AdminRedump_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_agent-list-instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) AgentListInstances(ctx context.Context, in *AgentListInstances_Input) (*AgentListInstances_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_agent-list-instances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"pathwar.land/v2/go/internal/testutil"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/internal/testutil"
"pathwar.land/pathwar/v2/go/pkg/errcode"
)

func TestService_AgentListInstances(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/pwapi/api_agent-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/errcode"
)

func (svc *service) AgentList(ctx context.Context, in *AgentList_Input) (*AgentList_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_agent-register.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"time"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) AgentRegister(ctx context.Context, in *AgentRegister_Input) (*AgentRegister_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_agent-register_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"pathwar.land/v2/go/internal/testutil"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/internal/testutil"
"pathwar.land/pathwar/v2/go/pkg/errcode"
)

func TestService_AgentRegister(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_agent-update-state.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) AgentUpdateState(ctx context.Context, in *AgentUpdateState_Input) (*AgentUpdateState_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_challenge-get.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) ChallengeGet(ctx context.Context, in *ChallengeGet_Input) (*ChallengeGet_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_challenge-get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"pathwar.land/v2/go/internal/testutil"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/internal/testutil"
"pathwar.land/pathwar/v2/go/pkg/errcode"
)

func TestService_ChallengeGet(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/pwapi/api_challenge-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/errcode"
)

func (svc *service) ChallengeList(context.Context, *ChallengeList_Input) (*ChallengeList_Output, error) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_challenge-subscription-close.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"time"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) ChallengeSubscriptionClose(ctx context.Context, in *ChallengeSubscriptionClose_Input) (*ChallengeSubscriptionClose_Output, error) {
Expand Down
8 changes: 4 additions & 4 deletions go/pkg/pwapi/api_challenge-subscription-close_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"pathwar.land/v2/go/internal/testutil"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/v2/go/pkg/pwinit"
"pathwar.land/pathwar/v2/go/internal/testutil"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/pwinit"
)

func TestSvc_ChallengeSubscriptionClose(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions go/pkg/pwapi/api_challenge-subscription-validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"errors"
"fmt"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/v2/go/pkg/pwinit"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/pwinit"
)

func (svc *service) ChallengeSubscriptionValidate(ctx context.Context, in *ChallengeSubscriptionValidate_Input) (*ChallengeSubscriptionValidate_Output, error) {
Expand Down
6 changes: 3 additions & 3 deletions go/pkg/pwapi/api_challenge-subscription-validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"pathwar.land/v2/go/internal/testutil"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/internal/testutil"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func TestSvc_ChallengeSubscriptionValidate(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_coupon-validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"

"github.com/jinzhu/gorm"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) CouponValidate(ctx context.Context, in *CouponValidate_Input) (*CouponValidate_Output, error) {
Expand Down
6 changes: 3 additions & 3 deletions go/pkg/pwapi/api_coupon-validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"pathwar.land/v2/go/internal/testutil"
"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/internal/testutil"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func TestEngine_CouponValidate(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/pwapi/api_organization-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pwapi
import (
"context"

"pathwar.land/v2/go/pkg/errcode"
"pathwar.land/v2/go/pkg/pwdb"
"pathwar.land/pathwar/v2/go/pkg/errcode"
"pathwar.land/pathwar/v2/go/pkg/pwdb"
)

func (svc *service) OrganizationList(context.Context, *OrganizationList_Input) (*OrganizationList_Output, error) {
Expand Down
Loading

0 comments on commit 86b841a

Please sign in to comment.