| commit | 2224066a0cc0b0fa150c733a614116c87807637e | [log] [tgz] |
|---|---|---|
| author | Robert Iannucci <iannucci@chromium.org> | Thu Jun 29 23:21:43 2017 |
| committer | Robert Iannucci <iannucci@chromium.org> | Thu Jun 29 23:21:45 2017 |
| tree | bf554646cdb21f48a6f822e18dda3fb0fa621703 | |
| parent | 585415ced4abef0b0ceff6c495690df98db83abb [diff] |
[errors] Greatly simplify common/errors package.
Now that we have tags with values, the original concept behind the 'data'
stuff in errors no longer applies. This removes the Reason().D() system and puts
the format directly into errors.Annotate. So:
errors.Annotate(err).Reason("foo: %(datum)s").D("datum", "value").Err()
Becomes:
errors.Annotate(err, "foo %s", "value").Err()
This also removes a bunch of rarely-or-never-used symbols from common/errors by
making them internal (particularly w.r.t. rendering an error). If we ever develop
a need for them, it would be easy to bring them back.
R=dnj@chromium.org, vadimsh@chromium.org
BUG=
Review-Url: https://codereview.chromium.org/2963503003 .
go get -u github.com/luci/luci-go/client/cmd/... go get -u github.com/luci/luci-go/server/cmd/...
/common/... and /server/..../appengine/..., /client/... and /server/...; for example, the structures used by the server APIs. These are inherently APIs./appengine/....go1 contains the stable code.master constains the latest code.user.email and user.name are configured in git config.go get -u -t github.com/luci/luci-go/client/...go get -u github.com/maruel/pre-commit-go/cmd/... && pcgRun the following to setup the code review tool and create your first review:
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/src/depot_tools export PATH="$PATH:$HOME/src/depot_tools" cd $GOROOT/github.com/luci/luci-go git checkout -b work origin/master # hack hack git commit -a -m "This is awesome\nR=joe@example.com" # This will ask for your Google Account credentials. git cl upload -s # Wait for LGTM over email. # Check the commit queue box in codereview website. # Wait for the change to be tested and landed automatically.
Use git cl help and git cl help <cmd> for more details.