-
Notifications
You must be signed in to change notification settings - Fork 164
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
Invalid import path #35
Comments
Hi,I can not reproduction your case in my windows environment。I install the git bash on the windows system, and I use the kit tool in the git bash, everything is ok. You can try it. |
Any update on this |
any update on this |
Hi,
I am facing an issue with the gen.
From $GOPATH/src, I run the following commands :
$kit new service bugs
type BugsService interface { // Add your methods here // e.x: Foo(ctx context.Context,s string)(rs string, err error) Create(ctx context.Context, bug string) error }
kit generate service bugs --dmw
=> Error
`$ kit generate service bugs --dmw
panic: Error 5:9: invalid import path: "C:/Users/Vincent/go/src/bugs/pkg/service" while formatting source:
// THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
package endpoint
import (
service "C:/Users/Vincent/go/src/bugs/pkg/service"
endpoint "github.com/go-kit/kit/endpoint"
)
...
`
The import path is absolute instead of relative.
There is maybe something wrong with my dev environment.
$ go env set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\Vincent\AppData\Local\go-build set GOEXE=.exe set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\Users\Vincent\go set GOPROXY= set GORACE= set GOROOT=C:\Go set GOTMPDIR= set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64 set GCCGO=gccgo set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD= set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Vincent\AppData\Local\Temp\go-build688545542=/tmp/go-build -gno-record-gcc-switches
I will appreciate your help.
Vincent
The text was updated successfully, but these errors were encountered: