Convenience decorator that applies [`Msg()`](#msg) to a callable.

    ```python
    from good import Schema, message

    @message(u'Need a number')
    def intify(v):
        return int(v)
    ```

    :param message: Error message to use instead
    :type message: unicode
    :param name: Override schema name as well. See [`name`](#name).
    :type name: None|unicode
    :return: decorator
    :rtype: callable

def message(message, name=None):
    """ Convenience decorator that applies [`Msg()`](#msg) to a callable.

    ```python
    from good import Schema, message

    @message(u'Need a number')
    def intify(v):
        return int(v)
    ```

    :param message: Error message to use instead
    :type message: unicode
    :param name: Override schema name as well. See [`name`](#name).
    :type name: None|unicode
    :return: decorator
    :rtype: callable
    """
    def decorator(func):
        wf = update_wrapper(Msg(func, message), func)
        if name:
            wf.name = name
        return wf
    return decorator