You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
All public methods in controllers are mapped to url path by default.
Maybe will be better if only methods with suffix or prefix "Action" will mapped by default. Some people can`t knew that their methods open for public.
Example:
// this will be parsed to /todo/home by default. Method for routing
func (t *Todo) ActionHome() {
todos := []models.Todo{}
....
t.HTML(http.StatusOK)
}
// this won`t be parsed by default. Simple public method
func (t *Todo) Home2() {
todos := []models.Todo{}
....
t.HTML(http.StatusOK)
}