commit | 34bd67e475523c58513ced8da69bebc2d72581b5 | [log] [tgz] |
---|---|---|
author | Aleksandra Bogoslavetc <alexasha470@gmail.com> | Mon Mar 16 18:25:31 2020 +0300 |
committer | Cody Oss <codyoss@google.com> | Thu Apr 02 16:08:41 2020 +0000 |
tree | 6323fa19d29ebf267573e42fbcef3e9c06e88716 | |
parent | 214a0d2663ab0d218fc5fee8d44e96019beb1151 [diff] |
bundler: type must be of type itemExample Add commentary about item type https://github.com/googleapis/google-api-go-client/issues/422 Fixes #422 Change-Id: I344e5bdff7918c5bc3a4d35615a9426bece8c1b2 Reviewed-on: https://code-review.googlesource.com/c/google-api-go-client/+/53390 Reviewed-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Cody Oss <codyoss@google.com>
diff --git a/support/bundler/bundler.go b/support/bundler/bundler.go index 418143d..5f603bd 100644 --- a/support/bundler/bundler.go +++ b/support/bundler/bundler.go
@@ -214,6 +214,8 @@ // Add adds item to the current bundle. It marks the bundle for handling and // starts a new one if any of the thresholds or limits are exceeded. +// The type of item must be assignable to the itemExample parameter of the NewBundler +// method, otherwise there will be a panic. // // If the item's size exceeds the maximum bundle size (Bundler.BundleByteLimit), then // the item can never be handled. Add returns ErrOversizedItem in this case.