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

getting below error when generating middleware #46

Open
dkundu1 opened this issue Oct 8, 2019 · 0 comments
Open

getting below error when generating middleware #46

dkundu1 opened this issue Oct 8, 2019 · 0 comments

Comments

@dkundu1
Copy link

dkundu1 commented Oct 8, 2019

Debap@LAPTOP-02U9U7J5 MINGW64 ~/Documents/goworkspace/src
$ kit generate service users --dmw
panic: Error 5:9: invalid import path: "c:/Users/Debap/Documents/goworkspace/src/users/pkg/service" while formatting source:
// THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
package endpoint

import (
service "c:/Users/Debap/Documents/goworkspace/src/users/pkg/service"
endpoint "github.com/go-kit/kit/endpoint"
)

// Endpoints collects all of the endpoints that compose a profile service. It's
// meant to be used as a helper struct, to collect all of the endpoints into a
// single parameter.
type Endpoints struct{
CreateEndpoint endpoint.Endpoint
}
// New returns a Endpoints struct that wraps the provided service, and wires in all of the
// expected endpoint middlewares
func New (s service.UsersService,mdw map[string] [] endpoint.Middleware) Endpoints {
eps := Endpoints {CreateEndpoint:MakeCreateEndpoint (s)}
for _,m := range mdw ["Create"] {
eps . CreateEndpoint = m (eps . CreateEndpoint)
}
return eps
}

goroutine 1 [running]:
github.com/dave/jennifer/jen.(*File).GoString(0xc0001cfe00, 0xc00015b6d0, 0xd0e260)
C:/Users/Debap/Documents/goworkspace/src/github.com/dave/jennifer/jen/file.go:235 +0x107
github.com/kujtimiihoxha/kit/generator.(*generateServiceEndpointsBase).Generate(0xc00010e360, 0x5, 0xc00010da34)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/generator/generate_service.go:967 +0x3274
github.com/kujtimiihoxha/kit/generator.(*GenerateService).Generate(0xc0000e40e0, 0x5, 0xbcad42)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/generator/generate_service.go:106 +0x599
github.com/kujtimiihoxha/kit/cmd.glob..func3(0x116a1a0, 0xc0002022e0, 0x1, 0x2)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/cmd/g_service.go:41 +0x1ab
github.com/spf13/cobra.(*Command).execute(0x116a1a0, 0xc0002022a0, 0x2, 0x2, 0x116a1a0, 0xc0002022a0)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:833 +0x2b1
github.com/spf13/cobra.(*Command).ExecuteC(0x116aba0, 0x28, 0xc13af0, 0xc000018d20)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:917 +0x302
github.com/spf13/cobra.(*Command).Execute(...)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:867
github.com/kujtimiihoxha/kit/cmd.Execute()
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/cmd/root.go:24 +0x38
main.main()
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/main.go:40 +0x2c4

Debap@LAPTOP-02U9U7J5 MINGW64 ~/Documents/goworkspace/src
$ kit generate service bugs --dmw
time="2019-10-08T09:39:58-04:00" level=error msg="Could not find the service interface in bugs"

Debap@LAPTOP-02U9U7J5 MINGW64 ~/Documents/goworkspace/src
$ kit new service bugs

Debap@LAPTOP-02U9U7J5 MINGW64 ~/Documents/goworkspace/src
$ kit generate service bugs --dmw
panic: Error 5:9: invalid import path: "c:/Users/Debap/Documents/goworkspace/src/bugs/pkg/service" while formatting source:
// THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
package endpoint

import (
service "c:/Users/Debap/Documents/goworkspace/src/bugs/pkg/service"
endpoint "github.com/go-kit/kit/endpoint"
)

// Endpoints collects all of the endpoints that compose a profile service. It's
// meant to be used as a helper struct, to collect all of the endpoints into a
// single parameter.
type Endpoints struct{
CreateEndpoint endpoint.Endpoint
}
// New returns a Endpoints struct that wraps the provided service, and wires in all of the
// expected endpoint middlewares
func New (s service.BugsService,mdw map[string] [] endpoint.Middleware) Endpoints {
eps := Endpoints {CreateEndpoint:MakeCreateEndpoint (s)}
for _,m := range mdw ["Create"] {
eps . CreateEndpoint = m (eps . CreateEndpoint)
}
return eps
}

goroutine 1 [running]:
github.com/dave/jennifer/jen.(*File).GoString(0xc000240960, 0xc0001776d0, 0xd0e260)
C:/Users/Debap/Documents/goworkspace/src/github.com/dave/jennifer/jen/file.go:235 +0x107
github.com/kujtimiihoxha/kit/generator.(*generateServiceEndpointsBase).Generate(0xc00026c1b0, 0x4, 0xc0002262a4)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/generator/generate_service.go:967 +0x3274
github.com/kujtimiihoxha/kit/generator.(*GenerateService).Generate(0xc000258000, 0x4, 0xbcad42)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/generator/generate_service.go:106 +0x599
github.com/kujtimiihoxha/kit/cmd.glob..func3(0x116a1a0, 0xc000230140, 0x1, 0x2)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/cmd/g_service.go:41 +0x1ab
github.com/spf13/cobra.(*Command).execute(0x116a1a0, 0xc000230100, 0x2, 0x2, 0x116a1a0, 0xc000230100)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:833 +0x2b1
github.com/spf13/cobra.(*Command).ExecuteC(0x116aba0, 0x28, 0xc13af0, 0xc00008e9c0)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:917 +0x302
github.com/spf13/cobra.(*Command).Execute(...)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:867
github.com/kujtimiihoxha/kit/cmd.Execute()
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/cmd/root.go:24 +0x38
main.main()
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/main.go:40 +0x2c4

Debap@LAPTOP-02U9U7J5 MINGW64 ~/Documents/goworkspace/src
$ kit generate service bugs --dmw
panic: Error 5:9: invalid import path: "c:/Users/Debap/Documents/goworkspace/src/bugs/pkg/service" while formatting source:
// THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
package endpoint

import (
service "c:/Users/Debap/Documents/goworkspace/src/bugs/pkg/service"
endpoint "github.com/go-kit/kit/endpoint"
)

// Endpoints collects all of the endpoints that compose a profile service. It's
// meant to be used as a helper struct, to collect all of the endpoints into a
// single parameter.
type Endpoints struct{
CreateEndpoint endpoint.Endpoint
}
// New returns a Endpoints struct that wraps the provided service, and wires in all of the
// expected endpoint middlewares
func New (s service.BugsService,mdw map[string] [] endpoint.Middleware) Endpoints {
eps := Endpoints {CreateEndpoint:MakeCreateEndpoint (s)}
for _,m := range mdw ["Create"] {
eps . CreateEndpoint = m (eps . CreateEndpoint)
}
return eps
}

goroutine 1 [running]:
github.com/dave/jennifer/jen.(*File).GoString(0xc0001cfb80, 0xc00015b6d0, 0xd0e260)
C:/Users/Debap/Documents/goworkspace/src/github.com/dave/jennifer/jen/file.go:235 +0x107
github.com/kujtimiihoxha/kit/generator.(*generateServiceEndpointsBase).Generate(0xc00010e510, 0x4, 0xc00010d824)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/generator/generate_service.go:967 +0x3274
github.com/kujtimiihoxha/kit/generator.(*GenerateService).Generate(0xc00023c000, 0x4, 0xbcad42)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/generator/generate_service.go:106 +0x599
github.com/kujtimiihoxha/kit/cmd.glob..func3(0x116a1a0, 0xc000208160, 0x1, 0x2)
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/cmd/g_service.go:41 +0x1ab
github.com/spf13/cobra.(*Command).execute(0x116a1a0, 0xc000208120, 0x2, 0x2, 0x116a1a0, 0xc000208120)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:833 +0x2b1
github.com/spf13/cobra.(*Command).ExecuteC(0x116aba0, 0x28, 0xc13af0, 0xc000018d20)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:917 +0x302
github.com/spf13/cobra.(*Command).Execute(...)
C:/Users/Debap/Documents/goworkspace/src/github.com/spf13/cobra/command.go:867
github.com/kujtimiihoxha/kit/cmd.Execute()
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/cmd/root.go:24 +0x38
main.main()
C:/Users/Debap/Documents/goworkspace/src/github.com/kujtimiihoxha/kit/main.go:40 +0x2c4

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

1 participant