func Find(name string) Factory {
	f, ok := filters[name]
	if !ok {
		return nil
	}
	return f
}
Find finds a filter.
package filter
import (
	"fmt"
	"strconv"
	"github.com/koron/nvgd/resource"
)
type Factory func(*resource.Resource, Params) (*resource.Resource, error)
var filters = map[string]Factory{}
func Register(name string, f Factory) error {
	_, ok := filters[name]
	if ok {
		return fmt.Errorf("duplicated filter name %q", name)
	}
	filters[name] = f
	return nil
}
func MustRegister(name string, f Factory) {
	if err := Register(name, f); err != nil {
		panic(err)
	}
}