parameters: (toolset_root)
return_statement: return True
docstring: Installs or updates Go toolset if necessary.
  
    Returns True if new toolset was installed.
docstring_summary: Installs or updates Go toolset if necessary.
docstring_tokens: Installs or updates Go toolset if necessary .
function: def ensure_toolset_installed(toolset_root):
    """Installs or updates Go toolset if necessary.
  
    Returns True if new toolset was installed.
    """
    installed = read_file([toolset_root, 'INSTALLED_TOOLSET'])
    available = get_toolset_url()
    if installed == available:
      LOGGER.debug('Go toolset is up-to-date: %s', TOOLSET_VERSION)
      return False
  
    LOGGER.info('Installing Go toolset.')
    LOGGER.info('  Old toolset is %s', installed)
    LOGGER.info('  New toolset is %s', available)
    remove_directory([toolset_root])
    install_toolset(toolset_root, available)
    LOGGER.info('Go toolset installed: %s', TOOLSET_VERSION)
    write_file([toolset_root, 'INSTALLED_TOOLSET'], available)
    return True
function_tokens: def ensure_toolset_installed ( toolset_root ) : installed = read_file ( [ toolset_root , 'INSTALLED_TOOLSET' ] ) available = get_toolset_url ( ) if installed == available : LOGGER . debug ( 'Go toolset is up-to-date: %s' , TOOLSET_VERSION ) return False LOGGER . info ( 'Installing Go toolset.' ) LOGGER . info ( '  Old toolset is %s' , installed ) LOGGER . info ( '  New toolset is %s' , available ) remove_directory ( [ toolset_root ] ) install_toolset ( toolset_root , available ) LOGGER . info ( 'Go toolset installed: %s' , TOOLSET_VERSION ) write_file ( [ toolset_root , 'INSTALLED_TOOLSET' ] , available ) return True