Application
Create new folder named src. In src folder, create new file named main.go as below:
package main
import "fmt"
func main() {
var a int = 5
if a > 2 {
fmt.Println("a > 2")
} else {
fmt.Println("a <= 2")
}
if b := -5; b > 3 {
fmt.Println("b > 3")
} else {
fmt.Println("b <= 3")
}
}
Output
Open Terminal windows in Visual Studio Code and run command line: go run main.go
a > 2
b <= 3