flamingo-commerce
flamingo-commerce copied to clipboard
how to use product module?
my code error here
2022-06-09T17:37:22.319+0900 INFO runtime/module.go:32 maxprocs: Leaving GOMAXPROCS=10: CPU quota undefined {"area": "root", "module": "core.runtime", "category": "module"}
2022-06-09T17:37:22.320+0900 INFO [email protected]/app.go:365 Starting HTTP Server at :3322 ..... {"area": "root"}
panic: "web.routesProvider": injecting into flamingo.me/flamingo-commerce/v3/product.<*product.routes Value>:
injecting into flamingo.me/flamingo-commerce/v3/product/interfaces/controller.<controller.View Value>:
can not instantiate interface flamingo.me/flamingo-commerce/v3/product/domain.ProductService
goroutine 1 [running]:
flamingo.me/dingo.(*Injector).createProvider.func1.1({0x0?, 0x0?, 0x17a7780?}, {0x1a370a0, 0xc000482940})
/Users/flexmekim/go/pkg/mod/flamingo.me/[email protected]/dingo.go:417 +0x22e
flamingo.me/dingo.(*Injector).createProvider.func1({0x0?, 0x0?, 0x0?})
/Users/flexmekim/go/pkg/mod/flamingo.me/[email protected]/dingo.go:427 +0x43b
flamingo.me/flamingo/v3/framework/web.(*Router).Handler(0xc0002468c0)
/Users/flexmekim/go/pkg/mod/flamingo.me/flamingo/[email protected]/framework/web/router.go:118 +0xf0
flamingo.me/flamingo/v3.serveProvider.func1(0xc000535680?, {0x18d7e95?, 0x0?, 0x0?})
/Users/flexmekim/go/pkg/mod/flamingo.me/flamingo/[email protected]/app.go:366 +0xff
github.com/spf13/cobra.(*Command).execute(0xc000535680, {0xc000032050, 0x0, 0x0})
/Users/flexmekim/go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xc00042e000)
/Users/flexmekim/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
/Users/flexmekim/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
flamingo.me/flamingo/v3.(*Application).Run(0xc00049a200)
/Users/flexmekim/go/pkg/mod/flamingo.me/flamingo/[email protected]/app.go:234 +0x1e9
flamingo.me/flamingo/v3.App({0xc00030a180?, 0x1004c51?, 0x10014e0?}, {0x0?, 0x0?, 0x17ae5e0?})
/Users/flexmekim/go/pkg/mod/flamingo.me/flamingo/[email protected]/app.go:208 +0x65
main.main()
/Users/flexmekim/go/src/github.com/flexmekim/flamingo-example/hello/main.go:12 +0x8c
exit status 2
and my project here
package main
import (
"hello/helloworld"
"flamingo.me/dingo"
"flamingo.me/flamingo-commerce/v3/product"
"flamingo.me/flamingo/v3"
)
func main() {
flamingo.App([]dingo.Module{
new(helloworld.Module),
new(product.Module),
})
}
and product module here