Go programming supports two kinds of comments. The single line will start with //, and the general or multiple lines will begin with /* and end with */. The following Golang example shows you the single and multi-line comments in a real-time example.
package main
import "fmt"
func main() {
var x string = "Hello World" // Variable Declaration
fmt.Println(x) //Printing x value
/*
----This is Multi-Line
Commnet
*/
y := 100 /* General Comment*/
fmt.Println(y)
}
