i-love-flamingo / example-helloworld

Hello World Flamingo Example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in 'handler' and 'routes' parameters passed to main.go

fshahy opened this issue · comments

Running this command
go run main.go handler
prints the following error on console:

`


Handle-name | registered actions


panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8c464b]

goroutine 1 [running]:
flamingo.me/flamingo/v3/framework/web.dumpHandler(0xc0001bd180, 0xc00010e280)
/home/farid/go/pkg/mod/flamingo.me/flamingo/v3@v3.0.0-beta.2/framework/web/routescmd.go:65 +0x19b
flamingo.me/flamingo/v3/framework/web.HandlerCmd.func1(0xc0002bd180, 0xf7e890, 0x0, 0x0)
/home/farid/go/pkg/mod/flamingo.me/flamingo/v3@v3.0.0-beta.2/framework/web/routescmd.go:37 +0x33
github.com/spf13/cobra.(*Command).execute(0xc0002bd180, 0xc00009e030, 0x0, 0x0, 0xc0002bd180, 0xc00009e030)
/home/farid/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0xc000298280, 0xb2de40, 0xc0000a6010, 0x952e40)
/home/farid/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2ec
github.com/spf13/cobra.(*Command).Execute(...)
/home/farid/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
flamingo.me/flamingo/v3.App(0xc0000ae960, 0x5, 0x5, 0x0, 0x0, 0x0)
/home/farid/go/pkg/mod/flamingo.me/flamingo/v3@v3.0.0-beta.2/app.go:138 +0x473
main.main()
/home/farid/github/me/example-helloworld/main.go:15 +0x180
exit status 2
`

running the go run main.go routes also throws the above error.

go version: go1.12.7 linux/amd64
branches: master and start-over

Thanks for mentioning.
The flamingo version referenced in go.mod was not updated

I run go get flamingo.me/flamingo/v3 to update it to latest tagged version.

You can either run the same command..

Or better just do git pull to get the updated go.mod