查找引用并转到Golang的定义功能失败 [英] Find References and Go to Definition features failure for Golang

查看:57
本文介绍了查找引用并转到Golang的定义功能失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

视觉工作室的"查找所有引用"和"转到定义"功能对于Go文件无法正常工作。我在这里发布这个以检查是否有其他人也注意到这一点并且可以找到解决方案。例如,名为func的函数在某个文件中称为
,如abc.func()。理想情况下,Go To定义应指向abc目录中此函数的定义,但事实并非如此。当我手动转到abc目录中的函数定义并尝试查找所有引用时,它只返回在同一目录中放置的文件中对该函数进行的
调用。理想情况下,它还应指向使用此目录外的文件中的abc.func()进行的调用。由Visual Studio提供的"guru"工具和其他扩展程序可以在最开始时安装以查找引用和
做分析。有没有人偶尔遇到这个?


Visual Studio版本 - 1.33.1


操作系统:Ubuntu 16.04

解决方案

嗨Zanderdebrown,


欢迎来到MSDN论坛。


根据你的描述,这个问题是关于Visual Studio代码和
这个,您可以提出问题并在 
堆栈
溢出
  并直接在我们的  GitHub
存储库
以获得更好的支持。


感谢您的理解,祝您度过愉快的一天。



最好的问候,


萨拉


Hi, the visual studio's 'Find all references' and 'Go to Definition' features doesn't work as expected for Go files. I'm posting this here to check if anyone else has noticed this as well and could find a solution. For example, a function named func is called in a certain file as abc.func(). The Go To definition should ideally point to the definition of this function in the abc directory but it doesn't. When I manually go to the function definition in the abc directory and try to find all references, it only returns calls made to that function in the files placed in the same directory. Ideally it should also point to the call made using abc.func() from a file outside this directory. The 'guru' tool and other extensions prompted by visual studio to find references and do analysis were already installed in the very beginning. Has anyone come across this anytime?

Visual Studio version - 1.33.1

OS: Ubuntu 16.04

解决方案

Hi Zanderdebrown,

Welcome to the MSDN forum.

According to your description, this issue is about the Visual Studio Code and per this, you can ask questions and search for answers on Stack Overflow and enter issues and feature requests directly in our GitHub repository for better support.

Thank you for your understanding and have a nice day.

Best regards,

Sara


这篇关于查找引用并转到Golang的定义功能失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆