diff options
Diffstat (limited to 'doc/codewalk/markov.go')
| -rw-r--r-- | doc/codewalk/markov.go | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/doc/codewalk/markov.go b/doc/codewalk/markov.go index 959c2b158..a8f322eb6 100644 --- a/doc/codewalk/markov.go +++ b/doc/codewalk/markov.go @@ -50,8 +50,8 @@ import (  	"flag"  	"fmt"  	"io" +	"math/rand"  	"os" -	"rand"  	"strings"  	"time"  ) @@ -120,8 +120,8 @@ func main() {  	numWords := flag.Int("words", 100, "maximum number of words to print")  	prefixLen := flag.Int("prefix", 2, "prefix length in words") -	flag.Parse()                  // Parse command-line flags. -	rand.Seed(time.Nanoseconds()) // Seed the random number generator. +	flag.Parse()                     // Parse command-line flags. +	rand.Seed(time.Now().UnixNano()) // Seed the random number generator.  	c := NewChain(*prefixLen)     // Initialize a new Chain.  	c.Build(os.Stdin)             // Build chains from standard input. | 
