func (ci *ControllerInfo) AddActionFilters(httpMethod string, actionName string, filters ...Filter) {
    ai := ci.GetAction(httpMethod, actionName)
    if ai == nil {
        panic("ControllerInfo.AddActionFilters: controller \"" + ci.Name + "\" no action for \"" +
            strings.ToUpper(httpMethod) + " " + actionName + "\".")
    }
    ai.AddFilters(filters...)
}
AddActionFilters adds filters for the controller
package goku
import (
    "fmt"
    "strings"
)
type ActionInfo struct {
    Name       string
    Controller *ControllerInfo
    Handler    func(ctx *HttpContext) ActionResulter
    Filters    []Filter
}
func (ai *ActionInfo) AddFilters(filters ...Filter) {
    for _, ft := range filters {
        if ft != nil {
            ai.Filters = append(ai.Filters, ft)
        }
    }
}
type ControllerInfo struct {
    Name    string
    Actions map[string]*ActionInfo
    Filters []Filter
}
func (ci *ControllerInfo) Init() *ControllerInfo {
    ci.Actions = make(map[string]*ActionInfo)
    return ci
}
func (ci *ControllerInfo) GetAction(method string, name string) *ActionInfo {
    ai, ok := ci.Actions[strings.ToLower(method)+"_"+strings.ToLower(name)]
    if !ok {
        ai, _ = ci.Actions["_"+strings.ToLower(name)]
    }
    return ai
}
func (ci *ControllerInfo) RegAction(httpMethod string, actionName string,
    handler func(ctx *HttpContext) ActionResulter) *ActionInfo {
    httpMethod = strings.ToLower(httpMethod)
    if httpMethod == "all" {
        httpMethod = ""
    }
    index := fmt.Sprintf("%s_%s", httpMethod, strings.ToLower(actionName))
    _, ok := ci.Actions[index]
    if ok {
        panic(fmt.Sprintf("%s %s.%s has registered.",
            strings.ToUpper(httpMethod), ci.Name, actionName))
    }
    ai := &ActionInfo{
        Name:       strings.ToLower(actionName),
        Controller: ci,
        Handler:    handler,
    }
    ci.Actions[index] = ai
    return ai
}
func (ci *ControllerInfo) AddFilters(filters ...Filter) {
    for _, ft := range filters {
        if ft != nil {
            ci.Filters = append(ci.Filters, ft)
        }
    }
}