summaryrefslogtreecommitdiff
path: root/doc/code.html
Commit message (Collapse)AuthorAgeFilesLines
* doc: remove code.htmlJean de Klerk2019-10-041-643/+0
| | | | | | | | | | | This is being moved to x/website in https://golang.org/cl/199058. Updates golang/go#33637 Updates golang/go#29206 Change-Id: I5c58b784fcdd212d7a003cd0f4085059f33a47c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/199057 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
* doc: remove double mention of custom workspaceAlberto Donizetti2019-09-291-5/+0
| | | | | | | | | | | | | | In the GOPATH section of the 'How To Write Go Code' document, it is mentioned two times in the span of a few lines that one can set GOPATH to a custom workspace path. The two paragraphs say basically the same thing, and they both link to golang.org/wiki/SettingGOPATH, so I'm quite sure the duplication is not intentional. This change deletes the second occurrence. Change-Id: I16f8bb8657041a23ed272eacf9adbc5637e8e34a Reviewed-on: https://go-review.googlesource.com/c/go/+/197839 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
* doc: use consistent path in example codeShulhan2019-05-131-3/+3
| | | | | | | | | | | | Previous section of documentation said that if GOPATH is not set then it will be default to "$HOME/go", not "$HOME/work". This change fix the path in example code to "$HOME/go", and while at it fix the output of git command after commit. Change-Id: Ifedca6c3997efd07e865c27b7321d755acad0254 Reviewed-on: https://go-review.googlesource.com/c/go/+/175258 Reviewed-by: Andrew Bonventre <andybons@golang.org>
* doc/code: drop mentions of GOPATH/pkg directoryRuss Cox2018-08-171-45/+6
| | | | | | | | | | | | It's already half gone and later will be all gone. It's not worth explaining in an introduction doc. Fixes #24506 Updates #4719 Change-Id: Ie48128b3aa090d84e0e734aa45f14a4480292913 Reviewed-on: https://go-review.googlesource.com/129679 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* doc: fix fmt usage in code.htmlTim Cooper2018-06-131-2/+2
| | | | | | | | Fixes #25876 Change-Id: I149dbb2afef13cc13fb5722d930377ed918d7e3c Reviewed-on: https://go-review.googlesource.com/118717 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* doc: use HTTPS for linksSuriyaa Sundararuban2018-06-131-1/+1
| | | | | | Change-Id: I9d2d25df067ca573589db5ff18296a5ec33866be Reviewed-on: https://go-review.googlesource.com/118595 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* doc: document the lack of support for symlinks under GOPATHNathan Cantelmo2018-06-121-0/+4
| | | | | | | | | | | | | | | In an effort to help others avoid the issues I've hit due to lack of symlink support under GOPATH, I've added a note of warning to the Workspaces section. I have not changed the contents of go help gopath, because on reflection it seems this change alone may be sufficient. Fixes #21320 Change-Id: Ib8969bf12cecad878e89ff66b5864bbf3caaf219 Reviewed-on: https://go-review.googlesource.com/61930 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* doc: Proper default value for the $GOPATH.Gabriel Nicolas Avellaneda2017-06-281-1/+1
| | | | | | | | It should be $HOME/go instead of $HOME/work Change-Id: I22e0a89deff30f935c3e25a237d6c0c161103339 Reviewed-on: https://go-review.googlesource.com/46890 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* doc: add link to the setting GOPATH guideJaana Burcu Dogan2017-03-071-2/+6
| | | | | | Change-Id: I4718c82540ef214728393824b89c8c7f6656823b Reviewed-on: https://go-review.googlesource.com/36210 Reviewed-by: Russ Cox <rsc@golang.org>
* cmd/go: add link to env varible guide to set custom GOPATHJaana Burcu Dogan2017-01-071-1/+1
| | | | | | | | | | | Also moves the GOPATH env variable guide to golang.org/wiki/SettingGOPATH. Fixes #18294. Change-Id: I88a2ce550df7466f8d2388d86bc8476dcf3c2ad6 Reviewed-on: https://go-review.googlesource.com/34918 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* doc: explain how to set GOPATH to a custom valueJaana Burcu Dogan2017-01-061-3/+7
| | | | | | | | Updates #18294. Change-Id: Ib6b84243a15ed921cc8960e5fa355fd7594181e6 Reviewed-on: https://go-review.googlesource.com/34821 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* doc, cmd/go: adjust documentation for default GOPATHRuss Cox2016-11-301-12/+25
| | | | | | | | | | | Replaces CL 33356. Fixes #17262. Change-Id: Idfb2343e90771775e51a66c63760f458737a288c Reviewed-on: https://go-review.googlesource.com/33730 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* go/build: add help info for unset $GOPATHEdward Muller2016-09-101-1/+1
| | | | | | | | | | | | | We relay this info in a few places, in a few different ways, but not consistently everywhere. This led one of our users to start googling and not find https://golang.org/doc/code.html#Workspaces, of which `go help gopath` is the most equivalent. Change-Id: I28a94375739f3aa4f200e145293ca2a5f65101e1 Reviewed-on: https://go-review.googlesource.com/28690 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
* doc: add Overview and other small edits to How To Write Go CodeAndrew Gerrand2016-01-121-12/+37
| | | | | | | | | Fixes #9228 Change-Id: Ic4df4a39f6f363bdd6eb9228c8164e6e9dccee1b Reviewed-on: https://go-review.googlesource.com/5561 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Austin Clements <austin@google.com>
* doc: Added link to 'go help gopath'Christopher Guiney2015-01-051-0/+5
| | | | | | | | | The existing go code document did not link to the GOPATH documentation. This will link to it, in hopes of making it more discoverable. Change-Id: Ie4ded2fdce08f412e4acbcc93acdd76f5791b84a Reviewed-on: https://go-review.googlesource.com/2265 Reviewed-by: Andrew Gerrand <adg@golang.org>
* doc: propose $GOPATH as $HOME/work, not $HOME/goAndrew Gerrand2014-12-161-5/+6
| | | | | | | | Related to issue #9228 Change-Id: I0819e657f6393788754d1412f9c2126a170d4cf1 Reviewed-on: https://go-review.googlesource.com/1577 Reviewed-by: Rob Pike <r@golang.org>
* [release-branch.go1.4] doc: scrub references to code.google.comAndrew Gerrand2014-12-121-2/+2
| | | | | | | | | | | | | | | | These are the references that affect current Go users. I left intact references in older release notes; we can figure out what to do with them later. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/186140043 Conflicts: doc/go1.4.html Change-Id: I1032686f2b3ac6dacaf8f114b8c35cdf221330ca
* all: use golang.org/x/... import pathsAndrew Gerrand2014-11-101-87/+96
| | | | | | | LGTM=rsc, r R=r, rsc CC=golang-codereview, golang-codereviews https://golang.org/cl/168050043
* doc: drop scheme from links that are known to support HTTPSAndrew Gerrand2014-07-251-8/+8
| | | | | | | | | | | golang.org now serves HTTPS with a valid cert, so it's reasonable that users should click through to the HTTPS versions of *.golang.org and other known sites. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/112650043
* doc: update installation instructionsAndrew Gerrand2013-11-211-1/+25
| | | | | | | | | | | | | Clarify that GOROOT should only be set when using a custom install path. Remove NetBSD from binary install page (we don't provide binaries). Remove "What's next" links from installation instructions. Emphasize "How to Write Go Code" page. Fixes #6613. R=golang-dev, r CC=golang-dev https://golang.org/cl/28700043
* doc: fix small HTML problemsShenghou Ma2013-10-121-1/+1
| | | | | | R=golang-dev, dave CC=golang-dev https://golang.org/cl/14629043
* doc: fix a few broken linksAndrew Gerrand2013-10-091-1/+1
| | | | | | R=golang-dev, r CC=golang-dev https://golang.org/cl/14494044
* doc: Fix typo in approximation of square rootKatrina Owen2013-05-291-2/+2
| | | | | | | | See https://en.wikipedia.org/wiki/Newton%27s_method#Square_root_of_a_number R=golang-dev, minux.ma, adg CC=golang-dev https://golang.org/cl/9145044
* doc/code.html: remove doubled word; modify the tab to space.Oling Cat2013-04-231-4/+4
| | | | | | R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/8919043
* doc/code.html: fix typosAndriy Lytvynov2013-04-041-2/+2
| | | | | | | | | Fixed example program's output to match program's code. Fixes #5204. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/8365043
* doc: use the already defined GOPATH in PATHDuncan Holm2013-04-041-1/+1
| | | | | | R=golang-dev, adg CC=golang-dev https://golang.org/cl/8248044
* doc: fix typos and trailing spacesAlexei Sholik2013-04-031-4/+4
| | | | | | R=golang-dev, adg CC=golang-dev https://golang.org/cl/8285044
* doc: mention godoc.org in "How to Write Go Code"Andrew Gerrand2013-04-041-3/+4
| | | | | | R=golang-dev, r CC=golang-dev https://golang.org/cl/8344043
* doc: simplify How to write Go code articleAndrew Gerrand2013-04-041-186/+275
| | | | | | | | | | This version just tells you what to do, rather than trying to teach you how it all works. Should be much better for newcomers. R=dave, gary.burd, alcosholik, r CC=golang-dev https://golang.org/cl/8247044
* doc: link to wiki Projects page instead of old Project Dashboard.Greg Ward2013-02-111-2/+2
| | | | | | R=golang-dev, adg CC=golang-dev https://golang.org/cl/7308079
* doc: fix various fragment linksAndrew Gerrand2013-01-151-2/+2
| | | | | | R=dsymonds CC=golang-dev https://golang.org/cl/7094058
* doc: link to Go coding screencastAndrew Gerrand2012-11-131-0/+4
| | | | | | R=golang-dev, r CC=golang-dev https://golang.org/cl/6849046
* doc: fix some HTML syntax errorsShenghou Ma2012-08-071-1/+1
| | | | | | R=adg CC=golang-dev https://golang.org/cl/6458043
* doc/code: mention $GOBINShenghou Ma2012-04-171-1/+2
| | | | | | R=golang-dev, adg CC=golang-dev https://golang.org/cl/5989045
* doc/code: update newmath.Sqrt test case to make sure test succeedShenghou Ma2012-04-101-2/+2
| | | | | | | | Fixes #3445. R=golang-dev, rsc, mtj CC=golang-dev https://golang.org/cl/5975061
* doc: shorten project dashboard linkAndrew Gerrand2012-04-051-1/+1
| | | | | | | | | Fixes #3420. (which was already fixed) R=golang-dev, bradfitz, dsymonds CC=golang-dev https://golang.org/cl/5987043
* doc/code.html: change 'affect' to 'effect'.Peter Weinberger2012-04-021-1/+1
| | | | | | | | Fixes #3429. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5966047
* doc/code.html: fix broken dashboard linkShenghou Ma2012-03-301-2/+2
| | | | | | | | | Fixes #3420. Part of issue 3424. R=golang-dev, cldorian, adg, r CC=golang-dev https://golang.org/cl/5958046
* doc: various typos, remove apostrophes from ordinalsJeremy Jackins2012-03-191-1/+1
| | | | | | R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5845059
* doc: fix some HTML errors in code.htmlSanjay Menakuru2012-03-021-3/+3
| | | | | | R=golang-dev, rsc CC=adg, golang-dev https://golang.org/cl/5720050
* doc: expand code.html to discuss the go tool in more depthAndrew Gerrand2012-03-021-195/+354
| | | | | | R=golang-dev, balasanjay, r CC=golang-dev https://golang.org/cl/5640045
* doc: add a bunch of missing <p> tagsStefan Nilsson2012-02-291-1/+1
| | | | | | R=golang-dev, gri CC=golang-dev https://golang.org/cl/5707065
* doc: various updates to doc/code.htmlShenghou Ma2012-02-181-4/+5
| | | | | | R=golang-dev, adg, r CC=golang-dev https://golang.org/cl/5649068
* godoc: specify HTML page metadata with a JSON blobAndrew Gerrand2012-01-191-1/+3
| | | | | | | | | | | | | | | | | This allows HTML pages to specify arbitrary data in a header: <!--{ "Title": "The page title", ... }--> replacing the old style comments: <!-- title The page title --> R=gri, rsc, r, bradfitz, dsymonds CC=golang-dev https://golang.org/cl/5532093
* doc: update "How to Write Go Code" to use the go toolAndrew Gerrand2012-01-121-158/+131
| | | | | | R=golang-dev, r, kevlar, rsc CC=golang-dev https://golang.org/cl/5534045
* doc: there's no such thing as a .cgo fileAndrew Gerrand2011-03-041-1/+1
| | | | | | R=rsc CC=golang-dev https://golang.org/cl/4264043
* doc: describe platform-specific conventions in code.htmlAndrew Gerrand2011-03-041-0/+44
| | | | | | R=r, rsc, gri CC=golang-dev https://golang.org/cl/4257049
* Make.pkg, doc: Replace references to "-benchmarks" and "-match" with ↵Kyle Consalus2011-02-221-1/+1
| | | | | | | | "-test.bench" and "-test.run". R=r CC=golang-dev https://golang.org/cl/4197041
* code.html: update to reflect that package names need not be uniqueRob Pike2011-02-121-3/+3
| | | | | | | | Fixes #1507. R=golang-dev, ehog.hedge, rsc CC=golang-dev https://golang.org/cl/4160049
* doc/code.html: fix reference to "gomake build"Anschel Schaffer-Cohen2010-11-291-1/+1
| | | | | | R=golang-dev, rsc CC=golang-dev https://golang.org/cl/3288042