Friday, 14 August 2015

Basic Go: Packages

Go programs starts from package main.




This package is using the packages with import paths "fmt"and "math/rand".

By convention, the package name is the same as the last element of the import path. For instance, the "math/rand" package comprises files that begin with the statement package rand.
Note: the environment in which these programs are executed is deterministic, sorand.Intn will always return the same number. (To see a different number, seed the number generator; see rand.Seed.) You wont see a new integer, it will be a string of integers.

No comments:

Post a Comment