Programming

Go programming language

Imports

This code groups the imports into a parenthesized, “factored” import statement.

package main

import (
	"fmt"
	"math/rand"
)

func main() {
	fmt.Println("My favorite number is", rand.Intn(10))
}

You can also write multiple import statements, like:

import "fmt"
import "math"

But it is good style to use the factored import statement.