maxence-charriere/go-app

Error while trying to compile intro code

ViK0s opened this issue · 3 comments

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.

@ViK0s

See #970

The documentation is current for V9 of go-app.. V10 documentation is coming.

Sadly the documentation is still outdated with the current release V10. Please use app.NewZeroComponentFactory(&hello{}) instead of &hello{}

Sorry, probably should have read the whole doc and not skipped straight to the getting started page 😓 .
Thank you for the fast help.