from typing import Dict


def change_goal(pattern: Dict[str, str], curr_goal: Dict[str, str]):
    """Modifies the current goal buffer using the given pattern.

    Args:
        pattern: A dict representing a pattern.
        curr_goal: A dict representing the current goal pattern.

    Returns:
        The current goal updated with the data in pattern.
    """
    if curr_goal == 0:
        return {}
    curr_goal.update(pattern)
    if "buffer" in curr_goal.keys():
        del curr_goal["buffer"]
    return curr_goal