diff options
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2021-05-06 08:07:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 08:07:07 +0000 |
commit | 3de369fd696e6b98d00259d3c759d9b81df4e84b (patch) | |
tree | 7c489ea3aa926cda031d6aaa4a852e9e6e469d14 /vendor/github.com/onsi/gomega/gbytes | |
parent | 9b9bd9e0e7b72c91d8e60103e8da7999cefbc63d (diff) | |
download | podman-3de369fd696e6b98d00259d3c759d9b81df4e84b.tar.gz podman-3de369fd696e6b98d00259d3c759d9b81df4e84b.tar.bz2 podman-3de369fd696e6b98d00259d3c759d9b81df4e84b.zip |
Bump github.com/onsi/gomega from 1.11.0 to 1.12.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.11.0...v1.12.0)
Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/onsi/gomega/gbytes')
-rw-r--r-- | vendor/github.com/onsi/gomega/gbytes/buffer.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/onsi/gomega/gbytes/buffer.go b/vendor/github.com/onsi/gomega/gbytes/buffer.go index 336086f4a..809f3c543 100644 --- a/vendor/github.com/onsi/gomega/gbytes/buffer.go +++ b/vendor/github.com/onsi/gomega/gbytes/buffer.go @@ -109,6 +109,22 @@ func (b *Buffer) Read(d []byte) (int, error) { } /* +Clear clears out the buffer's contents +*/ +func (b *Buffer) Clear() error { + b.lock.Lock() + defer b.lock.Unlock() + + if b.closed { + return errors.New("attempt to clear closed buffer") + } + + b.contents = []byte{} + b.readCursor = 0 + return nil +} + +/* Close signifies that the buffer will no longer be written to */ func (b *Buffer) Close() error { |