func (p Params) GetBool(key string) (bool, error) {
	v, ok := p[key]
	if !ok {
		return false, rule.ErrParamNotFound
	}
	b, ok := v.(bool)
	if !ok {
		return false, rule.ErrParamTypeMismatch
	}
	return b, nil
}
GetBool extracts a bool parameter corresponding to the given key.
package regula
import (
	"strconv"
	"github.com/heetch/regula/rule"
	"github.com/pkg/errors"
)
type Params map[string]interface{}
func (p Params) GetString(key string) (string, error) {
	v, ok := p[key]
	if !ok {
		return "", rule.ErrParamNotFound
	}
	s, ok := v.(string)
	if !ok {
		return "", rule.ErrParamTypeMismatch
	}
	return s, nil
}