Golang: Semicolon

By Xah Lee. Date: .

Semicolon is used in golang to separate statements.

When a statement is on a line by itself, semicolon is optional.

For example, the following are equivalent:

import ( "fmt"; "os"; )
import (
	"fmt"
	"os"
)