def get_pkg_doc_url(view, sel):
	region = sublime.Region(0, view.size())
	src = view.substr(region)
	imports = get_imports(src)
	#print imports

	selected = view.substr(sel)
	pkg,typ = '', ''
	if selected[0].isupper() and view.substr(sel.begin()-1) == '.':
		pkg = view.substr(view.word(sel.begin()-1))
		typ = selected
	else:
		pkg = selected

	#pkg could be an alias,
	fpkg = get_full_pkg(imports, pkg)
	#print 'pkg:', pkg, 'typ:', typ, 'fpkg:', fpkg
	
	#check if it's non-std package like "launchpad.net/mgo"
	if re.match('.*?\..*?/.*', fpkg):
		return 'http://gopkgdoc.appspot.com/pkg/' + fpkg + '#' + typ	
	else:
		return 'http://golang.org/pkg/' + fpkg + '/#' + typ
return pkg doc url for the selected obj in src
dataset/ETHPy150Open jtdeng/GoToDoc/GoToDoc.py/get_pkg_doc_url