Home  >  Article  >  Backend Development  >  How to search all uses of a text in GoLand (it's a text, not a function or something)

How to search all uses of a text in GoLand (it's a text, not a function or something)

王林
王林forward
2024-02-14 14:54:17682browse

How to search all uses of a text in GoLand (its a text, not a function or something)

In GoLand, searching for all uses of a text is one of the functions that developers often need to use. Whether you're looking for a variable, constant, string, or a specific piece of code, GoLand provides powerful search capabilities. By using shortcut keys, menu options, or the search bar, we can find the information we need quickly and accurately. This article will show you how to use these features in GoLand to search for all uses of a text.

Question content

Today, when I read about a great program, I wanted to find out all the uses of a text in fmt.Println(), but I don't know how to do this in GoLand. We can use "⌥ ⌘ F7" to search for some function or something. For example fmt.Println().

But when I want to find text in fmt.Println() I can't do it

But I can search text in VsCode

So, where is the problem? If anyone could tell me I would be very grateful.

Workaround

If you want to find a specific string anywhere in your project, consider using "Find in Files". You may want to use file masks and filters (such as the "String Literal" filter and the .*go file mask) to narrow your search.

If you want to find a string in a specific file, use "find" .

The above is the detailed content of How to search all uses of a text in GoLand (it's a text, not a function or something). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete