summaryrefslogtreecommitdiff
path: root/doc/progs
Commit message (Collapse)AuthorAgeFilesLines
* all: spell "marshal" and "unmarshal" consistentlyDmitri Shuralyov2016-11-123-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tree is inconsistent about single l vs double l in those words in documentation, test messages, and one error value text. $ git grep -E '[Mm]arshall(|s|er|ers|ed|ing)' | wc -l 42 $ git grep -E '[Mm]arshal(|s|er|ers|ed|ing)' | wc -l 1694 Make it consistently a single l, per earlier decisions. This means contributors won't be confused by misleading precedence, and it helps consistency. Change the spelling in one error value text in newRawAttributes of crypto/x509 package to be consistent. This change was generated with: perl -i -npe 's,([Mm]arshal)l(|s|er|ers|ed|ing),$1$2,' $(git grep -l -E '[Mm]arshall' | grep -v AUTHORS | grep -v CONTRIBUTORS) Updates #12431. Follows https://golang.org/cl/14150. Change-Id: I85d28a2d7692862ccb02d6a09f5d18538b6049a2 Reviewed-on: https://go-review.googlesource.com/33017 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* all: remove executable bit from several filesAndrew Gerrand2015-09-041-0/+0
| | | | | | Change-Id: Iab669b2a9dd0510c0e54f9ec1cbe2b83b991bceb Reviewed-on: https://go-review.googlesource.com/14283 Reviewed-by: Minux Ma <minux@golang.org>
* doc/progs: disable cgo tests that use C.Stdout on SolarisAram Hăvărneanu2015-05-061-3/+3
| | | | | | | | | | | | | Solaris, like Windows, NetBSD and OpenBSD, uses macros for stdin, stdout, and stderr. Cgo can't access them without getters/setters written in C. Because of this we disable affected tests like for the other platforms. Updates #10715. Change-Id: I3d33a5554b5ba209273dbdff992925a38a281b42 Reviewed-on: https://go-review.googlesource.com/8264 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* doc/progs: remove flaky timing-sensitive testMatthew Dempsky2015-04-301-1/+1
| | | | | | | | | | | Package time already has enough inherently flaky tests covering its behavior. No need for more of them. Fixes #10632. Change-Id: I1229e9fcc2e28ba2c9b0b79f73638e35dbbe8bbf Reviewed-on: https://go-review.googlesource.com/9517 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
* doc/progs: build test programs in temp directoryMatthew Dempsky2015-04-181-6/+16
| | | | | | | | | | | This avoids a race condition with go1.go wanting to examine files in the current directory with filepath.Walk(".", walkFn). Fixes #10497. Change-Id: I2159f40a08d1a768195dbb7ea3c27e38cf9740bb Reviewed-on: https://go-review.googlesource.com/9110 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* doc/progs: rewrite test driver in GoJosh Bleecher Snyder2015-04-0750-238/+226
| | | | | | | | | | | | | | | | | | | | | | | The tests in doc/progs appear to have been originally written for use with the old test driver. At some later point, they acquired their own test driver. Both ran tests in serial. This CL rewrites the current test driver in Go, runs tests concurrently, and cleans up historical artifacts from the old drivers. The primary motivation is to speed up all.bash. On my laptop, using tip, this CL reduces doc/progs test wall time from 26s to 7s. The savings will remain even when the compiler gets faster. Using Go 1.4, this CL reduces test wall time from 15s to 4s. Change-Id: Iae945a8490222beee76e8a2118a0d7956092f543 Reviewed-on: https://go-review.googlesource.com/8410 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* doc/progs: don't try building cgo tests if CGO_ENABLED=0Ian Lance Taylor2013-10-111-0/+3
| | | | | | R=golang-dev, jsing, r CC=golang-dev https://golang.org/cl/14523056
* doc/progs/slices.go: fix typo in commentRob Pike2013-08-051-1/+1
| | | | | | | | Fixes #6025. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12387046
* doc/articles: use C90 standard functions in the cgo article.Shenghou Ma2013-06-042-4/+4
| | | | | | R=golang-dev, iant CC=golang-dev https://golang.org/cl/9953043
* effective_go.html: move and rework the blank identifier sectionRob Pike2013-03-085-28/+41
| | | | | | | | Also rename the relevant examples and make sure the working one compiles. R=golang-dev, bradfitz, adg, iant, rsc CC=golang-dev https://golang.org/cl/7597043
* doc/articles/error_handling: no more os.ErrorShenghou Ma2013-02-061-1/+1
| | | | | | R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/7304053
* doc/effective_go.html: add a section about the blank identifierRuss Cox2013-01-222-0/+28
| | | | | | R=golang-dev, minux.ma, bradfitz, adg CC=golang-dev https://golang.org/cl/7134056
* cmd/gc: make forward declaration in pure Go package an errorRuss Cox2012-12-221-1/+5
| | | | | | | | | | | | | | | | | | | | An error during the compilation can be more precise than an error at link time. For 'func init', the error happens always: you can't forward declare an init func because the name gets mangled. For other funcs, the error happens only with the special (and never used by hand) -= flag, which tells 6g the package is pure go. The go command now passes -= for pure Go packages. Fixes #3705. R=ken2 CC=golang-dev https://golang.org/cl/6996054
* cgo: enable cgo on openbsdJoel Sing2012-12-211-0/+4
| | | | | | | | | | | | | | | | | | | | Enable cgo on OpenBSD. The OpenBSD ld.so(1) does not currently support PT_TLS sections. Work around this by fixing up the TCB that has been provided by librthread and reallocating a TCB with additional space for TLS. Also provide a wrapper for pthread_create, allowing zeroed TLS to be allocated for threads created externally to Go. Joint work with Shenghou Ma (minux). Requires change 6846064. Fixes #3205. R=golang-dev, minux.ma, iant, rsc, iant CC=golang-dev https://golang.org/cl/6853059
* effective_go: use html/template instead of text/templateRob Pike2012-09-131-3/+3
| | | | | | | | | Should have done this a long time ago. Fixes #3811. R=golang-dev, adg, rsc CC=golang-dev https://golang.org/cl/6488120
* doc/progs: use test/run.go for testing on WindowsShenghou Ma2012-09-0346-0/+113
| | | | | | | | | | cgo[1-4].go, go1.go couldn't be tested now (cgo[1-4].go can only be tested when cgo is enabled, go1.go contain a list of filenames in the current directory) R=golang-dev, alex.brainman, rsc CC=golang-dev https://golang.org/cl/6218048
* cgo: enable cgo on netbsd/386 and netbsd/amd64Joel Sing2012-06-051-0/+5
| | | | | | R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6261056
* doc: simplify the image_draw article example for converting an image toNigel Tao2012-04-261-2/+2
| | | | | | | | RGBA. R=adg, r, bsiegert CC=golang-dev https://golang.org/cl/6119054
* doc: added The Go image package articleFrancisco Souza2012-03-287-1/+114
| | | | | | | | | | | | Orignally published on The Go Programming Language, September 21, 2011. http://blog.golang.org/2011/09/go-image-package.html Update #2547 R=adg, nigeltao CC=golang-dev https://golang.org/cl/5933049
* effective_go: cleanups and fixesRob Pike2012-03-251-9/+9
| | | | | | | | | Also explain the situation with recursive String methods more accurately, and clean up the code now that the fmt package is more careful. R=golang-dev, minux.ma, bradfitz CC=golang-dev https://golang.org/cl/5907047
* doc/articles/image_draw.html: fix circle exampleRob Pike2012-03-231-2/+2
| | | | | | | | It was showing the same snippet twice instead of the type definition and snippet. R=golang-dev, iant CC=golang-dev https://golang.org/cl/5875045
* doc/articles: rename concurrency patterns articleRob Pike2012-03-231-1/+1
| | | | | | | | | The old name, automatically generated, was ludicrously verbose. Also clean up an example to use time.Second. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5876051
* doc: add JSON and Go articleFrancisco Souza2012-03-226-1/+292
| | | | | | | | | | Originally published on The Go Programming Language Blog, January 25, 2011. http://blog.golang.org/2011/01/json-and-go.html R=adg CC=golang-dev https://golang.org/cl/5846044
* doc: fix typo in The Laws of Reflection articleFrancisco Souza2012-03-211-0/+7
| | | | | | R=golang-dev, gri, r CC=golang-dev https://golang.org/cl/5876047
* doc: update format for "C? Go? Cgo!" articleShenghou Ma2012-03-191-2/+0
| | | | | | R=adg CC=golang-dev https://golang.org/cl/5841050
* doc: add Gobs of data articleFrancisco Souza2012-03-163-1/+71
| | | | | | | | | | Originally published on The Go Programming Language Blog, March 24, 2011. http://blog.golang.org/2011/03/gobs-of-data.html R=adg CC=golang-dev https://golang.org/cl/5834043
* doc: add Go Concurrency Patterns: Timing out, moving on articleFrancisco Souza2012-03-143-1/+61
| | | | | | | | | | | | Originally published on The Go Programming Language Blog, September 23, 2010. http://blog.golang.org/2010/09/go-concurrency-patterns-timing-out-and.html Update #2547. R=golang-dev, adg CC=golang-dev https://golang.org/cl/5815044
* doc: add Go image/draw package article and convert code snippets to Go1.Johan Euphrosine2012-03-141-0/+142
| | | | | | | | | | | | Originally published on The Go Programming Language Blog, September 29, 2011. http://blog.golang.org/2011/09/go-imagedraw-package.html Update #2547. R=golang-dev, adg, rsc CC=golang-dev https://golang.org/cl/5755057
* doc/progs: skip cgo1 and cgo2 on freebsdAndrew Gerrand2012-03-131-4/+10
| | | | | | | | FreeBSD's srandom has a different signature to darwin/linux. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5795067
* doc: add C? Go? Cgo! articleFrancisco Souza2012-03-135-1/+86
| | | | | | | | | | | | Originally published on The Go Programming Language Blog, March 17, 2011. http://blog.golang.org/2011/03/c-go-cgo.html Update #2547. R=golang-dev, adg CC=golang-dev https://golang.org/cl/5777054
* doc: fix typos in laws_of_reflection article, add copyright notice.Johan Euphrosine2012-03-072-0/+19
| | | | | | | | Update #2547. R=golang-dev, minux.ma, r, r, adg CC=golang-dev https://golang.org/cl/5755051
* doc: remove unsued progs and makehtml script, update progs/runShenghou Ma2012-03-0710-282/+9
| | | | | | | | | | | | Due to removal of go_tutorial, unused programs are removed. makehtml is unnecessary (it also gives wrong messages when the destination file doesn't exist) progs/run now compiles all remaining programs under doc/progs. Fixes #3076 (again) R=golang-dev, adg CC=golang-dev https://golang.org/cl/5755053
* doc/progs: update for go 1Rob Pike2012-03-054-38/+36
| | | | | | | | Fixes #3076. R=golang-dev, dsymonds, r CC=golang-dev https://golang.org/cl/5727056
* doc: add The Laws of Reflection articleJohan Euphrosine2012-03-012-0/+168
| | | | | | | | | | | | Originally published on The Go Programming Language Blog, September 6, 2011. http://blog.golang.org/2011/09/laws-of-reflection.html Update #2547 R=golang-dev, r, adg CC=golang-dev https://golang.org/cl/5689054
* tutorial: deleteRob Pike2012-02-289-539/+0
| | | | | | | | | | Instead we'll point people at the Tour and beef up code.html. Fixes #3107. R=golang-dev, bradfitz, r, adg CC=golang-dev https://golang.org/cl/5697077
* doc: provide example filepath.Walk for go1Mike Rosset2012-02-171-0/+21
| | | | | | R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5674067
* os: delete os.EINVAL and so onRob Pike2012-02-173-6/+17
| | | | | | | | | | | | The set of errors forwarded by the os package varied with system and was therefore non-portable. Three helpers added for portable error checking: IsExist, IsNotExist, and IsPermission. One or two more may need to come, but let's keep the set very small to discourage thinking about errors that way. R=mikioh.mikioh, gustavo, r, rsc CC=golang-dev https://golang.org/cl/5672047
* doc/progs: Add the usual Copyright notice.Olivier Duperray2012-01-231-0/+4
| | | | | | R=golang-dev, adg CC=golang-dev https://golang.org/cl/5568043
* doc/go1: flag, runtime, testingRob Pike2012-01-201-0/+19
| | | | | | R=golang-dev, dsymonds, gri CC=golang-dev https://golang.org/cl/5557076
* build: don't use a fixed filename in tempBrad Fitzpatrick2012-01-121-1/+1
| | | | | | | | Fixes #2688 R=golang-dev, gri, rsc CC=golang-dev https://golang.org/cl/5539050
* doc: trivial comment typo fixShenghou Ma2012-01-122-3/+3
| | | | | | R=golang-dev, r CC=golang-dev https://golang.org/cl/5529080
* doc: only trim newlines in tmpltohtml, gofmt progsAndrew Gerrand2012-01-099-4/+19
| | | | | | R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5530048
* doc: add Slices: usage and internals articleAndrew Gerrand2012-01-062-0/+56
| | | | | | | | | Originally published on the Go blog on 5 Jan 2011: http://blog.golang.org/2011/01/go-slices-usage-and-internals.html R=golang-dev, gri CC=golang-dev https://golang.org/cl/5516046
* doc/progs: test defer programsAndrew Gerrand2012-01-052-0/+13
| | | | | | R=golang-dev, iant CC=golang-dev https://golang.org/cl/5517044
* doc/progs/run: go1 prints output; fix testRob Pike2011-12-211-1/+1
| | | | | | R=golang-dev, adg CC=golang-dev https://golang.org/cl/5502060
* doc/go1: timeRob Pike2011-12-121-13/+29
| | | | | | R=rsc CC=golang-dev https://golang.org/cl/5477077
* doc: add Error Handling articleAndrew Gerrand2011-12-135-0/+307
| | | | | | | | | | | | Originally published on The Go Programming Language Blog, July 12, 2011. http://blog.golang.org/2011/07/error-handling-and-go.html Update #2547 R=golang-dev, r CC=golang-dev https://golang.org/cl/5475060
* doc/go1: the simpler package changesRob Pike2011-12-121-0/+26
| | | | | | R=golang-dev, fullung, dsymonds, r, adg CC=golang-dev https://golang.org/cl/5477056
* doc: remove file.go from run (fix windows build)Andrew Gerrand2011-12-121-1/+0
| | | | | | R=golang-dev, r, alex.brainman, r CC=golang-dev https://golang.org/cl/5479069
* doc: add Defer, Panic, and Recover articleAndrew Gerrand2011-12-123-18/+143
| | | | | | | | | | | | Originally published on The Go Programming Language Blog, August 4 2010. http://blog.golang.org/2010/08/defer-panic-and-recover.html Update #2547 R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5479053