goaltools / goal

Goal is a toolkit for high productivity web development in Go language in the spirit of Revel Framework that is built around the concept of code generation.
BSD 2-Clause "Simplified" License
87 stars 3 forks source link

Restore the "listing" tool #7

Closed ghost closed 9 years ago

ghost commented 9 years ago

This PR reverts the changes made for #1.

Currently, controllers have a pretty simple definition: any type that has (1) actions or (2) magic methods.

  1. Action is a method that returns http.Handler as the first argument.
  2. Magic methods are:
    • Before and After actions;
    • Initially and Finally methods:
func (c Controller) Initially(w http.ResponseWriter, r *http.Request) bool {
}

1 will require us to rethink the definition of controllers and rewrite the generate/handlers tool. I want to think it over before making further changes. Probably, two approaches will be used simultaneously, not sure yet.