Search code examples
gosettingsgoland

How can I search for all of the usage of one text in GoLand(It is a text, not a function or something)


When I read a great program today, I wanted to find out all of the usage of one text in fmt.Println(), but I didn't know how to do that in GoLand. We can use "⌥ ⌘ F7" to search for some functions or other things. fmt.Println() for example.

picture of finding the function fmt.Println()

But I can't do it when I want to find the text in fmt.Println() The situation when I search for the text

But I can search the text in VsCode When I search it in VsCode

So, what's the problem? I would appreciate it if somebody could tell me.


Solution

  • If you want to find a particular string anywhere in a project, consider using "Find in Files". You might want to narrow your search using file masks and filters like "In string literals" filter and .*go file mask.

    Find in Files filters

    If you are looking for a string in a particular file, use "Find".