From eca2ec078640a3bdcbb9742318cc07085d2c80d2 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 5 Jul 2010 16:25:29 +1000 Subject: [PATCH] doc/go_tutorial: mention order of compilation In response to this recurring issue: http://groups.google.com/group/golang-nuts/t/710d1e8347cd51fa R=r CC=golang-dev https://golang.org/cl/1682050 --- doc/go_tutorial.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/go_tutorial.html b/doc/go_tutorial.html index 7eb09b5b4b6..b16f3201783 100644 --- a/doc/go_tutorial.html +++ b/doc/go_tutorial.html @@ -650,8 +650,12 @@ We can now use our new package: 21 }

-The ''./'' in the import of ''./file'' tells the compiler to use our own package rather than -something from the directory of installed packages. +The ''./'' in the import of ''./file'' tells the +compiler to use the ''file'' package in the current directory +rather than something from the directory of installed packages. +

+

+You must compile ''file.go'' before any package that imports it.

Finally we can run the program: