#NEWLINE# def run( self , edit ) : #NEWLINE# #INDENT# sels = self . view . sel ( ) #NEWLINE# for sel in sels : #NEWLINE# #INDENT# sel_txt = self . view . substr ( sel ) . strip ( ) #NEWLINE# if ( sel_txt == '' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if GO_KEYWORDS . has_key ( sel_txt ) : #NEWLINE# #INDENT# doc_url = ( 'http://golang.org/ref/spec#' + GO_KEYWORDS [ sel_txt ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( sel_txt in GO_BUILTINS ) : #NEWLINE# #INDENT# doc_url = ( 'http://golang.org/pkg/builtin/#' + sel_txt ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# doc_url = get_pkg_doc_url ( doc_url . view , sel ) #NEWLINE# #UNINDENT# #UNINDENT# webbrowser . open_new_tab ( doc_url )