Posts Tagged ‘import statement’

IMPORTS

 

This code groups the imports into a parenthesized, “factored” import statement. You can also write multiple import statements, like:

	import "fmt"
	import "math"

but it’s common to use the factored form to eliminate clutter.

Example :

package main

import (
“fmt”
“math”
)

func main() {
fmt.Printf(“Now you have %g problems.”,
math.Nextafter(2, 3))
}

output:

Now you have 2.0000000000000004 problems.