From my research of the docs, net/http only handles GET and POST requests. Are there plans to use a mux which can handle PUT or DELETE requests? You can trigger these requests from the templates just like any other form element using htmx.
Using Post for deleting/updating will have consequences, since Post isn't idempotent.
Excuse my poor Go knowledge, but I'm trying to display the current user's username on the home page using ShowHome(), in controllers/getcontrollers.go. Here's the code:
A valid user is never returned from GetCurrentUser(). At first I thought it was a database problem, but it seems to be working fine. Is there something wrong with this go code? Thank you.
I may recall you saying you want to incorporate cli flags into goweb?
I've recently had success with a flags library https://github.com/spf13/pflag
This calls into question how we manage configuration. What type of things should be in a config file, and
what others should be configured on the cli? For example, I think it'd be more manageable to leave
db information in env.json but configure port as a cli flag.
The main gripe with using json for configuration is the lack of an ability to comment the file.
Perhaps toml, or another ml would suffice if there's an easy to use go library.