datastore: variadic Get, Put, Exists, Delete.

Fixes #51.

Update Get, Put, Exists, and Delete to be variadic. This will make the
interface more usable and get rid of boilerplate in client code.

Get, Put, Exists, and Delete now accept variadic arguments. Any one of
these arguments can be an argument that was previously valid or
the *Multi version of those functions. This effectively obsoletes the *Multi
versions, but they are left in for backwards compatiblility with the stated
intention of removing them at a later date.

Get/Put/Exists/Delete will now return a single error in the one-argument
case or a MultiError in a multiple-argument case. Note that now that single
argument case can take a slice type, the single error may itself be a
MultiError if the single argument is a slice.

Review-Url: https://codereview.chromium.org/2011773002
6 files changed
tree: e8882f240a60c1790cd42049b44e83ea42fe7721
  1. filter/
  2. impl/
  3. infra/
  4. service/
  5. tools/
  6. .travis.yml
  7. codereview.settings
  8. doc.go
  9. LICENSE
  10. pre-commit-go.yml
  11. PRESUBMIT.py
  12. README.md
  13. symbols.go
README.md

gae: A Google AppEngine SDK wrapper

designed for testing and extensibility

THIS PACKAGE HAS NO API COMPATIBILITY GUARANTEES. USE UNPINNED AT YOUR OWN PERIL.

(but generally it should be pretty stableish).

GoDoc Build Status Coverage Status

Installing

go get -u github.com/luci/gae/...

Why/What/How

See the godocs.

Versioning

  • Branch master contains the latest code.

Contributing

  • Sign the Google CLA.
  • Make sure your user.email and user.name are configured in git config.
  • Install the pcg git hook: go get -u github.com/maruel/pre-commit-go/cmd/... && pcg

Run 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/gae
git new-branch work
# or `git checkout -b work origin/master` if you like typing more.

# hack hack

git commit -a -m "This is awesome\[email protected]"
# This will ask for your Google Account credentials.
git cl upload -s
# Wait for LGTM over email.
# Check Commit Queue checkbox in Rietveld codereview site.
# See it tested and landed automatically.

Use git cl help and git cl help <cmd> for more details.