summaryrefslogtreecommitdiff
path: root/doc/progs
Commit message (Collapse)AuthorAgeFilesLines
* 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://codereview.appspot.com/14523056
* doc/progs/slices.go: fix typo in commentRob Pike2013-08-051-1/+1
| | | | | | | | Fixes issue 6025. R=golang-dev, dsymonds CC=golang-dev https://codereview.appspot.com/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://codereview.appspot.com/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://codereview.appspot.com/7597043
* doc/articles/error_handling: no more os.ErrorShenghou Ma2013-02-061-1/+1
| | | | | | R=golang-dev, dsymonds CC=golang-dev https://codereview.appspot.com/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://codereview.appspot.com/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 issue 3705. R=ken2 CC=golang-dev https://codereview.appspot.com/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 issue 3205. R=golang-dev, minux.ma, iant, rsc, iant CC=golang-dev https://codereview.appspot.com/6853059
* effective_go: use html/template instead of text/templateRob Pike2012-09-131-3/+3
| | | | | | | | | Should have done this a long time ago. Fixes issue 3811. R=golang-dev, adg, rsc CC=golang-dev http://codereview.appspot.com/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 http://codereview.appspot.com/6218048
* cgo: enable cgo on netbsd/386 and netbsd/amd64Joel Sing2012-06-051-0/+5
| | | | | | R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/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 http://codereview.appspot.com/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 issue 2547 R=adg, nigeltao CC=golang-dev http://codereview.appspot.com/5933049 Committer: Nigel Tao <nigeltao@golang.org>
* 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 http://codereview.appspot.com/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 http://codereview.appspot.com/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 http://codereview.appspot.com/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 http://codereview.appspot.com/5846044 Committer: Andrew Gerrand <adg@golang.org>
* doc: fix typo in The Laws of Reflection articleFrancisco Souza2012-03-211-0/+7
| | | | | | | | R=golang-dev, gri, r CC=golang-dev http://codereview.appspot.com/5876047 Committer: Robert Griesemer <gri@golang.org>
* doc: update format for "C? Go? Cgo!" articleShenghou Ma2012-03-191-2/+0
| | | | | | R=adg CC=golang-dev http://codereview.appspot.com/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 http://codereview.appspot.com/5834043 Committer: Andrew Gerrand <adg@golang.org>
* 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 issue 2547. R=golang-dev, adg CC=golang-dev http://codereview.appspot.com/5815044 Committer: Andrew Gerrand <adg@golang.org>
* 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 issue 2547. R=golang-dev, adg, rsc CC=golang-dev http://codereview.appspot.com/5755057 Committer: Andrew Gerrand <adg@golang.org>
* 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 http://codereview.appspot.com/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 issue 2547. R=golang-dev, adg CC=golang-dev http://codereview.appspot.com/5777054 Committer: Andrew Gerrand <adg@golang.org>
* doc: fix typos in laws_of_reflection article, add copyright notice.Johan Euphrosine2012-03-072-0/+19
| | | | | | | | | | Update issue 2547. R=golang-dev, minux.ma, r, r, adg CC=golang-dev http://codereview.appspot.com/5755051 Committer: Andrew Gerrand <adg@golang.org>
* 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 issue 3076 (again) R=golang-dev, adg CC=golang-dev http://codereview.appspot.com/5755053 Committer: Andrew Gerrand <adg@golang.org>
* doc/progs: update for go 1Rob Pike2012-03-054-38/+36
| | | | | | | | Fixes issue 3076. R=golang-dev, dsymonds, r CC=golang-dev http://codereview.appspot.com/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 issue 2547 R=golang-dev, r, adg CC=golang-dev http://codereview.appspot.com/5689054 Committer: Andrew Gerrand <adg@golang.org>
* tutorial: deleteRob Pike2012-02-289-539/+0
| | | | | | | | | | Instead we'll point people at the Tour and beef up code.html. Fixes issue 3107. R=golang-dev, bradfitz, r, adg CC=golang-dev http://codereview.appspot.com/5697077
* doc: provide example filepath.Walk for go1Mike Rosset2012-02-171-0/+21
| | | | | | | | R=golang-dev, r, r CC=golang-dev http://codereview.appspot.com/5674067 Committer: Rob Pike <r@golang.org>
* 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 http://codereview.appspot.com/5672047
* doc/progs: Add the usual Copyright notice.Olivier Duperray2012-01-231-0/+4
| | | | | | | | R=golang-dev, adg CC=golang-dev http://codereview.appspot.com/5568043 Committer: Andrew Gerrand <adg@golang.org>
* doc/go1: flag, runtime, testingRob Pike2012-01-201-0/+19
| | | | | | R=golang-dev, dsymonds, gri CC=golang-dev http://codereview.appspot.com/5557076
* build: don't use a fixed filename in tempBrad Fitzpatrick2012-01-121-1/+1
| | | | | | | | Fixes issue 2688 R=golang-dev, gri, rsc CC=golang-dev http://codereview.appspot.com/5539050
* doc: trivial comment typo fixShenghou Ma2012-01-122-3/+3
| | | | | | | | R=golang-dev, r CC=golang-dev http://codereview.appspot.com/5529080 Committer: Rob Pike <r@golang.org>
* doc: only trim newlines in tmpltohtml, gofmt progsAndrew Gerrand2012-01-099-4/+19
| | | | | | R=golang-dev, r, r CC=golang-dev http://codereview.appspot.com/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 http://codereview.appspot.com/5516046
* doc/progs: test defer programsAndrew Gerrand2012-01-052-0/+13
| | | | | | R=golang-dev, iant CC=golang-dev http://codereview.appspot.com/5517044
* doc/progs/run: go1 prints output; fix testRob Pike2011-12-211-1/+1
| | | | | | R=golang-dev, adg CC=golang-dev http://codereview.appspot.com/5502060
* doc/go1: timeRob Pike2011-12-121-13/+29
| | | | | | R=rsc CC=golang-dev http://codereview.appspot.com/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 issue 2547 R=golang-dev, r CC=golang-dev http://codereview.appspot.com/5475060
* doc/go1: the simpler package changesRob Pike2011-12-121-0/+26
| | | | | | R=golang-dev, fullung, dsymonds, r, adg CC=golang-dev http://codereview.appspot.com/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 http://codereview.appspot.com/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 issue 2547 R=golang-dev, r, r CC=golang-dev http://codereview.appspot.com/5479053
* doc/go1: the rest of the language changesRob Pike2011-12-091-1/+51
| | | | | | R=rsc CC=golang-dev http://codereview.appspot.com/5478047
* doc/go1: most of the simple language changesRob Pike2011-12-081-0/+74
| | | | | | R=rsc, adg, r CC=golang-dev http://codereview.appspot.com/5477044
* doc/go1: map deletionRob Pike2011-12-072-0/+25
| | | | | | | | | | | | | This CL is in part a proposal for how to write these sections: - Brief discussion of change - No attempt to analyze the thinking about it - Old code - New code, runnable if possible - How to update old programs R=golang-dev, remyoudompheng, gri, adg CC=golang-dev http://codereview.appspot.com/5454044
* doc: do not slice array literalRuss Cox2011-12-021-1/+2
| | | | | | | | | | | | | | 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 http://codereview.appspot.com/5437120
* doc/progs: fix windows version to satisfy new errorAlex Brainman2011-11-141-17/+5
| | | | | | R=rsc CC=golang-dev http://codereview.appspot.com/5376089
* syscall: use errorRuss Cox2011-11-131-17/+5
| | | | | | | | | | | - syscall (not os) now defines the Errno type. - the low-level assembly functions Syscall, Syscall6, and so on return Errno, not uintptr - syscall wrappers all return error, not uintptr. R=golang-dev, mikioh.mikioh, r, alex.brainman CC=golang-dev http://codereview.appspot.com/5372080