Golang Comments

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 

    y := 100 /* General Comment*/
Golang Go Comments Example