Posts Tagged ‘software-development’



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 (

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


Now you have 2.0000000000000004 problems.

This tour is also available as a stand-alone program that you can use without access to the internet.

The stand-alone tour is faster, as it builds and runs the code samples on your own machine. It also includes additional exercises not available in this sandboxed version.

To run the tour locally first install Go, then use go get to install gotour:

    go get

and run the resultant gotour executable.