Error while trying to compile intro code
ViK0s opened this issue · 3 comments
ViK0s commented
Hello,
I have a problem while running the code from "Getting Started" page of the docs. I get the error:
./main.go:31:17: cannot use &hello{} (value of type *hello) as func() app.Composer value in argument to app.Route
I'm running go version go1.22.5 linux/amd64 on ubuntu 22.04.3 on wsl, but I tried running the code on windows and I had the same error.
mlctrez commented
oderwat commented
Sadly the documentation is still outdated with the current release V10. Please use app.NewZeroComponentFactory(&hello{})
instead of &hello{}
ViK0s commented
Sorry, probably should have read the whole doc and not skipped straight to the getting started page 😓 .
Thank you for the fast help.