Closed biancarosa closed 1 week ago
Yes, I agree that the package name should match exactly the folder. I prefer to keep names singular as the Go authors said.
There are other "s" typos to fix in this CLI, I will work on this tomorrow.
Thanks for reporting and sorry for the long delay!
Also, don't hesitate to make a PR for this kind of issue. It might be frightening to contribute to open-source but it really isn't!
This kind of issue is perfect for newcomers to try the "open-source workflow". I will tackle this tomorrow if you don't have time today.
Happy coding :)
I can tackle this for sure! Somewhere in between tomorrow and Sunday.
Hi @biancarosa !
Did you have time to work on this?
Don't hesitate to open a draft PR :)
To Reproduce Steps to reproduce the behavior:
go run github.com/go-fuego/fuego/cmd/fuego@latest controller books
Expected behavior
controllers.BooksRessources{}.Routes(s)
without having to change the package name inside of the generated file.Screenshots N/A
Framework version (please check if it happens with the last Fuego version before posting):
v0.14.0
Go version (please check if it happens with the last Go version before posting):
go1.22.6 darwin/amd64
Additional context The docs are partially correct because of this; we need to make a decision whether to keep controllers vs controller and ensure the docs follow this naming convention. If we decide to keep
controller
as the package name, I'd suggest renaming the folder and we still need to update the example in the docs accordingly.