Change-Id: Ibbaf613d84b76e78eaf001d082b505e24885d4d6
Reviewed-on: https://go-review.googlesource.com/c/example/+/613276
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Eli Bendersky <eliben@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dan Peterson <danp@danp.net>
Apply suggestions from go.dev/cl/608737 to the other ragserver variants
Change-Id: I627cec1ff21c8f7c1b1d257b542435793ade680d
Reviewed-on: https://go-review.googlesource.com/c/example/+/609305
TryBot-Bypass: Eli Bendersky <eliben@google.com>
Auto-Submit: Eli Bendersky <eliben@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Eli Bendersky <eliben@google.com>
Change-Id: I9e34c00ea00a01190e898c4de236061da1e1f55e
Reviewed-on: https://go-review.googlesource.com/c/example/+/608737
Auto-Submit: Eli Bendersky <eliben@google.com>
TryBot-Bypass: Eli Bendersky <eliben@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Eli Bendersky <eliben@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change-Id: I76c6fc25ee8cf6a8c97ed23502b116aa3d3a6041
Reviewed-on: https://go-review.googlesource.com/c/example/+/608735
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Eli Bendersky <eliben@google.com>
Reviewed-by: Eli Bendersky <eliben@google.com>
Auto-Submit: Eli Bendersky <eliben@google.com>
Change-Id: I256449c9cd97ef53251e326d943858c237b4ea16
Reviewed-on: https://go-review.googlesource.com/c/example/+/608055
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Eli Bendersky <eliben@google.com>
TryBot-Bypass: Eli Bendersky <eliben@google.com>
Reviewed-by: Eli Bendersky <eliben@google.com>
It is very obsolete. Use go/packages instead.
Also, add a go generate command to weave the README.
Fixesgolang/go#60593
Change-Id: Ifaf3ffa588dc3e65fb1e96b39b249a9084d66451
Reviewed-on: https://go-review.googlesource.com/c/example/+/534695
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Commit-Queue: Alan Donovan <adonovan@google.com>
- Fix a broken link.
- When discussing handler options, mention ReplaceAttr.
This were both suggested by Peter Aronoff (peteraronoff@fastmail.com)
in a direct email.
Change-Id: I286142a1c5736691e32042e383f9a98e78f0fb49
Reviewed-on: https://go-review.googlesource.com/c/example/+/524758
Commit-Queue: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Jonathan Amsterdam <jba@google.com>
This will be linked from an updated go.dev/blog/examples.
For #61722.
Change-Id: I329141141e0590a6d7ee0b6b504c8f7bdc9c2d5f
Reviewed-on: https://go-review.googlesource.com/c/example/+/515237
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
It was documented and parsed but not used.
Change-Id: I4c19429b3761819b3bae70f06fc2b55431c0f88c
Reviewed-on: https://go-review.googlesource.com/c/example/+/514578
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
We want to revive golang.org/x/example as a test case for
an experiment with a 'gonew' command.
This CL updates outyet to be a gonew-able sample server,
by making it its own module. The CL also removes
Dockerfile and containers.yaml because I think the
best practices around those files have evolved too much
since 2015 when they were written.
Change-Id: I53faf4b30de9e4ef3bfe35a781732daa140a9877
Reviewed-on: https://go-review.googlesource.com/c/example/+/513998
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Cameron Balahan <cbalahan@google.com>
We want to revive golang.org/x/example as a test case for
an experiment with a 'gonew' command.
This CL adds a basic "hello, world" web server as
golang.org/x/example/helloserver.
Change-Id: Icf76c756f7b256285d4c5e6a33655996597eb2da
Reviewed-on: https://go-review.googlesource.com/c/example/+/513997
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Cameron Balahan <cbalahan@google.com>
We want to revive golang.org/x/example as a test case for
an experiment with a 'gonew' command.
This CL changes the hello world program to be standalone
and demonstrate a bit more about flag parsing and command-line
logging.
Change-Id: Iee481344c801f046813806a537d59e3242f9152a
Reviewed-on: https://go-review.googlesource.com/c/example/+/513996
Reviewed-by: Cameron Balahan <cbalahan@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
For reasons that are lost to history, this repo was not using the
standard Go license even though it is part of the Go project.
Fix that, relicensing the code under the standard Go license
and patent grant.
Change-Id: I4b59aa0e20339afdf291b2303b0648ca953520fe
Reviewed-on: https://go-review.googlesource.com/c/example/+/513995
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Cameron Balahan <cbalahan@google.com>
Pull the discussion of the Handle method up.
It makes more sense to talk about it before WithGroup and WithAttrs.
Change-Id: I01a1b4b98131079cf74d2d965742a48acf5c3407
Reviewed-on: https://go-review.googlesource.com/c/example/+/509957
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Begin discussing a running example of a slog.Handler implementation.
Initially we'll ignore the WithAttrs and WithGroup methods.
The implementation that does that is in indenthandler1.
This CL contains the complete implementation, but discusses
only the types and constructor function.
Change-Id: I3b635aee66a6d5df64bc13ce6bfb7ae4881606fe
Reviewed-on: https://go-review.googlesource.com/c/example/+/509955
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Add a document for helping writers of slog handlers.
Change-Id: I079b738d1109a5e1d555c5dfb81eabf1d187f907
Reviewed-on: https://go-review.googlesource.com/c/example/+/494576
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Add a file that will ultimately contain a guide to writing slog handlers.
This CL just creates the file so we can make a shortlink to it.
Change-Id: Ic31e62c6d92a480ecb7ba03cf052ca375f5abb94
Reviewed-on: https://go-review.googlesource.com/c/example/+/509735
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
This will enable generics in examples for the slog handler guide.
Change-Id: I8fe2d876961899c15511226d29e1e5c2ef72519b
Reviewed-on: https://go-review.googlesource.com/c/example/+/509100
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Regenerate README.md from go-types.md. There are minor changes,
mostly removals of line-ending spaces.
Change-Id: I83ba4b385de44e0dd2c61f5f3019d08a24ebad29
Reviewed-on: https://go-review.googlesource.com/c/example/+/494595
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Move the weave program out of the gotypes directory
so it can be used by other example documents.
It will soon be used for a document on writing slog handlers.
Change-Id: I38255e276e744e323695afaa66830107aa17d4d1
Reviewed-on: https://go-review.googlesource.com/c/example/+/494441
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Gofmt to update doc comments to the new formatting.
For golang/go#51082.
Change-Id: Ic98f647623f234cf5d36309c6204683e151820d7
Reviewed-on: https://go-review.googlesource.com/c/example/+/399596
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Update the go/types guide to have a link to the new 1.18 API guide, for
now.
Also fix some links to pkg.go.dev and golang.org/x that were amended in
the autogenerated README.md rather than the original source.
For golang/go#50676
Change-Id: Ib98ed095d74be02046c426e51f1ae2b9ceb03b0d
Reviewed-on: https://go-review.googlesource.com/c/example/+/389656
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
After go1.16, `go get` runs in modules mode, and it's not the
recommended way of installing binaries nor a way to fetch source
code. Given that this example repo is designed for new go users
who want to learn, it is better to guide users to clone the repo
using the git command.
Updated the instruction for appengine-hello since goapp is gone.
I didn't test the appengine-hello instruction myself and not sure
if it still runs.
Change-Id: I74a829203def9b062bee75637c7d2c6cef448a2f
Reviewed-on: https://go-review.googlesource.com/c/example/+/340113
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
The module name is golang.org/x/example and the canonical repo
is go.googlesource.com/example.
Add the pkg.go.dev link in the main README.md and remove
stale godoc.org links.
Change-Id: Ia67be2179885d144c97284237df1f4373717722d
Reviewed-on: https://go-review.googlesource.com/c/example/+/307689
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Add a go.mod and go.sum file for the example repo. Updates the import
path for the packages in this repository to begin with
golang.org/x/example.
Change-Id: I79a8dcfff9cebd4aa8586c57f19f86305a213598
Reviewed-on: https://go-review.googlesource.com/c/example/+/283332
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>