#NEWLINE# @ staticmethod #NEWLINE# def _get_architecture( ) : #NEWLINE# #INDENT# architecture_map = { #NEWLINE# #INDENT# 'arm' : '5' , #NEWLINE# 'amd64' : '6' , #NEWLINE# '386' : '8' , #NEWLINE# #UNINDENT# } #NEWLINE# for platform in os . listdir ( os . path . join ( _GOROOT , 'pkg' , 'tool' ) ) : #NEWLINE# #INDENT# if ( '_' not in platform ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# architecture = platform . split ( '_' , 1 ) [ 1 ] #NEWLINE# if ( architecture in architecture_map ) : #NEWLINE# #INDENT# return architecture_map [ architecture ] #NEWLINE# #UNINDENT# #UNINDENT# if ( not architecture ) : #NEWLINE# #INDENT# raise BuildError ( ( 'no compiler found found in goroot (%s)' % _GOROOT ) )