Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorect import when using go modules with full project name #16

Open
Tapanito opened this issue Sep 28, 2020 · 2 comments
Open

Incorect import when using go modules with full project name #16

Tapanito opened this issue Sep 28, 2020 · 2 comments

Comments

@Tapanito
Copy link

Tapanito commented Sep 28, 2020

Hi,

I came across a bug whilst generating boilercode for go-kit.
I'm running go version:
go version go1.15.2 linux/amd64

Running the latest version of kit.

The service was generated as follows:

 kit new service vavite -m bitbucket.org/tapanito/hello

Then to generate the middleware and other boiler code:

kit generate service -w -t grpc --svc-mdw hello -f

The generates imports block looks as follows:

import (
	"context"
	service "hello/pkg/service"

	endpoint "github.com/go-kit/kit/endpoint"
)

The culprit line is: service "hello/pkg/service", as I'm using go modules with the module name bitbucket.org/tapanito/hello the import service "hello/pkg/service" is not valid.

@GrantZheng
Copy link
Owner

Hi,

I came across a bug whilst generating boilercode for go-kit.
I'm running go version:
go version go1.15.2 linux/amd64

Running the latest version of kit.

The service was generated as follows:

 kit new service vavite -m bitbucket.org/tapanito/hello

Then to generate the middleware and other boiler code:

kit generate service -w -t grpc --svc-mdw hello -f

The generates imports block looks as follows:

import (
	"context"
	service "hello/pkg/service"

	endpoint "github.com/go-kit/kit/endpoint"
)

The culprit line is: service "hello/pkg/service", as I'm using go modules with the module name bitbucket.org/tapanito/hello the import service "hello/pkg/service" is not valid.

Sorry,it‘s a bug, I will fix it at once.

GrantZheng added a commit that referenced this issue Oct 16, 2020
@GrantZheng
Copy link
Owner

GrantZheng commented Oct 16, 2020

Hi,

I came across a bug whilst generating boilercode for go-kit.
I'm running go version:
go version go1.15.2 linux/amd64

Running the latest version of kit.

The service was generated as follows:

 kit new service vavite -m bitbucket.org/tapanito/hello

Then to generate the middleware and other boiler code:

kit generate service -w -t grpc --svc-mdw hello -f

The generates imports block looks as follows:

import (
	"context"
	service "hello/pkg/service"

	endpoint "github.com/go-kit/kit/endpoint"
)

The culprit line is: service "hello/pkg/service", as I'm using go modules with the module name bitbucket.org/tapanito/hello the import service "hello/pkg/service" is not valid.

Hi,I have fixed, it is bug caused by the PR(#12

isala404 pushed a commit to thinksmartlk/go-kit-cli that referenced this issue Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants