1
0
mirror of https://github.com/golang/go synced 2024-09-25 01:20:13 -06:00
Commit Graph

51 Commits

Author SHA1 Message Date
Andrew Gerrand
468e692e38 doc: only trim newlines in tmpltohtml, gofmt progs
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5530048
2012-01-09 20:05:34 +11:00
Andrew Gerrand
5353e1ef96 doc: trim spaces from code snippets
gofmt likes to put lines like
  // STOP OMIT
two blank lines from a closing brace, creating an ugly space inside
<pre> blocks in some of these files. This change resolves this issue.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5520044
2012-01-06 09:20:31 +11:00
Rob Pike
c99f4f5bf6 doc: delete go course notes
They're out of date, a pain to maintain, and most of the material
is better served by the Go Tour.

Fixes #2101.

R=golang-dev, rsc, r, adg
CC=golang-dev
https://golang.org/cl/5489053
2011-12-19 13:23:27 -08:00
Rob Pike
b78a7b7dab doc/go_tutorial: make clear the file example is Unix-specific
Fixes #2553.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5472074
2011-12-11 21:03:49 -08:00
Rob Pike
1ddedbae31 tmpltohtml: put a DO NOT EDIT mark automatically in the output
R=r, rsc, r
CC=golang-dev
https://golang.org/cl/5469045
2011-12-08 11:26:49 -08:00
Russ Cox
da5a251dde doc: do not slice array literal
The special case in the spec is that you can take the
address of a composite literal using the & operator.

A composite literal is not, however, generally addressable,
and the slice operator requires an addressable argument,
so [3]int{1,2,3}[:] is invalid.  This tutorial code and one bug
report are the only places in the tree where it appears.

R=r, gri
CC=golang-dev
https://golang.org/cl/5437120
2011-12-02 12:30:37 -05:00
Rob Pike
422e247332 tutorial: update go_tutorial.html
There's version skew with respect to the programs in doc/progs.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5433048
2011-11-22 11:53:30 -08:00
Rob Pike
a50ee009f7 tutorial: describe unidirectional channels
R=golang-dev, adg, gri
CC=golang-dev
https://golang.org/cl/5370058
2011-11-10 14:02:14 -08:00
Russ Cox
44526cdbe0 non-pkg: gofix -r error -force=error
R=golang-dev, iant, r, r
CC=golang-dev
https://golang.org/cl/5307066
2011-11-01 22:06:05 -04:00
Rob Pike
68050ac76b tutorial,effective_go: prepare for error change
R=adg, rsc
CC=golang-dev
https://golang.org/cl/5316068
2011-11-01 21:50:21 -04:00
Andrew Gerrand
cab53c899c doc: fix tutorial and Makefile PATH without dot
Fixes #2351.

R=r, bradfitz
CC=golang-dev
https://golang.org/cl/5235056
2011-10-10 11:16:04 +11:00
Rob Pike
934c768019 doc: update tutorial.
Fix for new regexp library ($ isn't end of line any more).
Don't assume . is in PATH.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5175052
2011-10-03 16:18:47 -07:00
Rob Pike
c1c8d46d20 go_tutorial: change the way it's generated.
No longer do we generate HTML from it; instead the input
file is already in HTML but has template invocations to
extract programs from other files.
Delete htmlgen, which is no longer needed.
Add tmpltohtml, which runs the templating code.

R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/4699041
2011-07-13 13:20:05 +10:00
Rob Pike
c17347eea9 tutorial: remove all line numbers and references to them.
R=golang-dev, mikioh.mikioh, dsymonds
CC=golang-dev
https://golang.org/cl/4675070
2011-07-09 23:17:38 +10:00
Rob Pike
9cf37c3723 docs: fold the prog.sh scripting from makehtml into htmlgen itself.
This allows us to drop some crufty scripting and provides a firmer
footing for building better tools for preparing documents with source
code inside.

Also eliminate line numbers from the examples and text.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4650069
2011-07-04 16:15:14 +10:00
Rob Pike
4b1170d2b1 sort: change IntArray etc. to IntSlice for better name hygiene.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4602054
2011-06-11 09:25:18 +10:00
Rob Pike
9b409ac7ee docs: Update notes for 3-day Go course.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4605041
2011-06-10 15:05:51 +10:00
Andrew Gerrand
79eded509c doc: don't insert paragraphs inside pre blocks
doc: update go_tutorial

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4568056
2011-06-06 13:33:05 +10:00
Rob Pike
46f482a2fc docs: remove some prose-unworthy empty parentheses.
In our evolving style, prose should name a function "f" not "f()".

R=gri, rsc
CC=golang-dev
https://golang.org/cl/4550075
2011-05-25 06:44:09 +10:00
Rob Pike
2ccd20a646 tutorial: replace the forever loops with finite counts in sieve programs.
Fixes #1742.
I hope.

Also this picks up an update to go_tutorial.html that should already have happened.

R=brainman, rsc, peterGo
CC=golang-dev
https://golang.org/cl/4452050
2011-04-27 09:59:27 -07:00
Rob Pike
23fc9c84bd tutorial: modernize the definition and use of Open.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/4446053
2011-04-18 10:51:40 -07:00
Rob Pike
7115eef6be tutorial: rework the introduction to give "Effective Go"
prominence and downplay the course notes.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/4190041
2011-02-14 11:25:00 -08:00
Rob Pike
80e25fc923 docs: float->float64 plus a couple of other tweaks.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/3978042
2011-01-19 23:07:38 -05:00
Rob Pike
166b444a93 tutorial: make stdin, stdout, stderr work on Windows.
R=brainman
CC=golang-dev
https://golang.org/cl/4042042
2011-01-18 11:01:47 -08:00
Rob Pike
e3b6188ca2 tutorial: a couple of minor fixes.
Fixes #1333.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3556041
2010-12-09 16:18:31 -05:00
Andrew Gerrand
7de5e6e84d go_tutorial: change wording slightly and sync .txt and .html post-gofmt
Fixes #1211.

R=r, r2
CC=golang-dev
https://golang.org/cl/2635041
2010-10-21 14:59:23 +11:00
Rob Pike
781462dc46 doc/tutorial: update for slice changes.
Awaiting the lower-bound change before checkin.

Fixes #1067.

R=rsc, iant, gri
CC=golang-dev
https://golang.org/cl/2105043
2010-09-10 13:53:18 +10:00
Rob Pike
cd8f4cd206 tutorial: regenerate HTML to pick up change to progs/file.go.
Fixes #1075.

R=gri
CC=golang-dev
https://golang.org/cl/2104048
2010-09-04 10:22:49 +10:00
Rob Pike
708d7160fa tutorial: show how to compile helloworld3, which depends on ./file
make shell prompts consistent

R=rsc
CC=golang-dev
https://golang.org/cl/1824042
2010-07-14 13:29:12 -07:00
Andrew Gerrand
eca2ec0786 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
2010-07-05 16:25:29 +10:00
Rob Pike
b9055629c1 tutorial: update discussion of variadic functions
R=rsc
CC=golang-dev
https://golang.org/cl/1677042
2010-06-14 12:27:22 -07:00
Rob Pike
f81abb9dd8 tutorial: fix one-word mistake in echo example
R=rsc, iant
CC=golang-dev
https://golang.org/cl/1567041
2010-06-05 12:06:18 -07:00
Andrew Gerrand
a82349614b go_tutorial: removed outdated use of semicolons
R=r
CC=golang-dev
https://golang.org/cl/1013042
2010-04-28 10:50:44 +10:00
Rob Pike
34356e9a6a update tutorial.
R=rsc
CC=golang-dev
https://golang.org/cl/179063
2009-12-16 10:29:53 +11:00
Rob Pike
bbd4cb382a fix naked < as reported by pwil3058@gmail.com
R=rsc
CC=pwil3058
https://golang.org/cl/174087
2009-12-14 13:30:11 +11:00
Rob Pike
029c39f45a fix some typos in the documentation
Fixes #196.

R=rsc
https://golang.org/cl/154152
2009-11-15 12:09:59 -08:00
Rob Pike
9549eeecd1 add a paragraph about semicolons to the tutorial.
fix a typo caught by kakugawa@gmail.com

Fixes #92.

R=rsc
CC=golang-dev
https://golang.org/cl/152105
2009-11-12 14:10:16 -08:00
Rob Pike
cf16443c69 fix a couple of typos.
add a mention of range to the tutorial.
change tutorial's title.

R=rsc
CC=golang-dev
https://golang.org/cl/152098
2009-11-12 11:05:20 -08:00
Rob Pike
0d93dbcf9b link the course slides from early in the tutorial
R=rsc
CC=go-dev
http://go/go-review/1026031
2009-11-08 22:03:12 -08:00
Ian Lance Taylor
97a55a7485 Minor cleanups.
These are all fairly trivial and may be ignored.

R=r
CC=go-dev
http://go/go-review/1024025
2009-11-08 21:00:45 -08:00
Russ Cox
898714a92f tutorial fixes
R=r
CC=go-dev
http://go/go-review/1024014
2009-11-07 18:05:30 -08:00
Rob Pike
83f0b718ed fixups in the tutorial
also add a section about compiling programs because some found it surprising not to have one

R=rsc
CC=go-dev
http://go/go-review/1018011
2009-11-01 20:47:03 -08:00
Russ Cox
a68592a4dd excise some internal references.
R=r
DELTA=209  (65 added, 114 deleted, 30 changed)
OCL=35718
CL=35721
2009-10-14 13:02:05 -07:00
Rob Pike
68c921e25c add an entry in the lang faq about reference types.
remove a mention of sawzall in the tutorial.

R=rsc
DELTA=36  (14 added, 4 deleted, 18 changed)
OCL=35717
CL=35719
2009-10-14 11:53:55 -07:00
Rob Pike
bf983a0df2 bye-bye to old makehtml.
go can do the job just fine.

R=rsc
DELTA=290  (209 added, 13 deleted, 68 changed)
OCL=35699
CL=35699
2009-10-13 22:10:16 -07:00
Rob Pike
327b6c637e fix links in tutorial
R=rsc
DELTA=30  (0 added, 22 deleted, 8 changed)
OCL=35694
CL=35697
2009-10-13 18:01:24 -07:00
Rob Pike
cd7062ef6f clean up the mess that copyright notices make
R=rsc
DELTA=555  (92 added, 38 deleted, 425 changed)
OCL=35691
CL=35693
2009-10-13 17:17:30 -07:00
Rob Pike
400fa1c893 align the tutorial with the renaming of SortInterface.
fix a bug in makehtml - was deleting the output!

R=rsc
DELTA=11  (2 added, 0 deleted, 9 changed)
OCL=35672
CL=35674
2009-10-13 13:05:42 -07:00
Robert Griesemer
53440da835 Factored out boilerplate from all html docs in doc directory:
- the first HTML comment in those files is extracted as page
  title when serving them
- lib/godoc.html is top-level template for all pages served
- experimented a bit with package documentation layout
  (feedback welcome)
- various related cleanups

TODO:
- The / page (doc/root.html) content repeats links that are
  in the navigation bar. It needs to be cleaned up.

R=rsc
DELTA=826  (86 added, 692 deleted, 48 changed)
OCL=35230
CL=35245
2009-10-01 14:08:00 -07:00
Rob Pike
ea4ada89e1 process tutorial into new format
R=rsc
DELTA=161  (57 added, 56 deleted, 48 changed)
OCL=34926
CL=34929
2009-09-23 12:31:57 -07:00