Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the little "a:" for/mean in GoLand?

In the JetBrains GoLand IDE, when I type a basic "Hello, World!" example, there is a small a: in front of the string passed to fmt.Println() that is added by the IDE. What does it mean and what is its purpose?

small a

I could not find the answer in the documentation.

like image 486
Dan Avatar asked Dec 11 '17 01:12

Dan


People also ask

Is GoLand same as GO?

You might hear the language called both Go and Golang, which might be confusing. I once thought they were names for different languages. But Golang is just another name for Go – and Go remains the official name. Golang came from the domain name of the Go official website, golang.org.

How do you find out where a function is in GoLand?

When you press ( Alt+F7 ), GoLand looks for usages of interface methods. To find usages of the current method, press Ctrl+Alt+Shift+F7 . Check the results in the Find tool window.


1 Answers

These are known as parameter hints, and they are common in JetBrains IDEs. Basically, it's the name of the parameter in the definition of fmt.Println. See the official docs, where the first parameter is named a in the definition of Println.

like image 68
Christian Santos Avatar answered Sep 20 '22 10:09

Christian Santos