Hacker News new | ask | show | jobs
by notafrog 2554 days ago
My biggest issue with navigating Go codebases is that sometimes it's cumbersome to find where a specific type/function is defined, when there are multiple files under the same directory.
4 comments

A simple text search will find it every time. Since Go code should always be formatted, it's pretty trivial to search for `type HTTPServer` or `func NewServer(` ... even over fairly large codebases this will give few enough hits that you can just search everything most of the time.
Not to mention trying to figure out which types implement a given interface. You'll get completely unrelated types you don't care about a lot of the time.
Would this not be solvable with something like ctags or godef?

(I'm a newbie with Go so I've probably missed something in the problem you're describing).

I've had this issue as well and found that it makes using an IDE almost mandatory for large code bases.