def _escaped_str(text: str) -> str:
    """Escape the text and returns it as a valid Golang string."""
    return '"{}"'.format(
        text.replace('\\', '\\\\').replace('"', '\\"').replace('\a', '\\a').replace('\f', '\\f').replace('\t', '\\t')
        .replace('\n', '\\n').replace('\r', '\\r').replace('\v', '\\v'))