parameters: (name, workspaces)
return_statement: return name
docstring: Returns full path to an executable in some bin/ (in GOROOT or GOBIN).
docstring_summary: Returns full path to an executable in some bin/ (in GOROOT or GOBIN).
docstring_tokens: Returns full path to an executable in some bin / ( in GOROOT or GOBIN ) .
function: def find_executable(name, workspaces):
    """Returns full path to an executable in some bin/ (in GOROOT or GOBIN)."""
    basename = name
    if EXE_SFX and basename.endswith(EXE_SFX):
      basename = basename[:-len(EXE_SFX)]
    roots = [os.path.join(TOOLSET_ROOT, 'go', 'bin')]
    for path in workspaces:
      roots.extend([
        os.path.join(path, 'bin'),
      ])
    for root in roots:
      full_path = os.path.join(root, basename + EXE_SFX)
      if os.path.exists(full_path):
        return full_path
    return name
function_tokens: def find_executable ( name , workspaces ) : basename = name if EXE_SFX and basename . endswith ( EXE_SFX ) : basename = basename [ : - len ( EXE_SFX ) ] roots = [ os . path . join ( TOOLSET_ROOT , 'go' , 'bin' ) ] for path in workspaces : roots . extend ( [ os . path . join ( path , 'bin' ) , ] ) for root in roots : full_path = os . path . join ( root , basename + EXE_SFX ) if os . path . exists ( full_path ) : return full_path return name