diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-06 06:24:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 06:24:19 -0400 |
commit | 0b05ba808d5e2fc75ce10b23405bd5c05da2c331 (patch) | |
tree | 7c489ea3aa926cda031d6aaa4a852e9e6e469d14 /vendor/github.com/onsi/gomega/gbytes/buffer.go | |
parent | 9b9bd9e0e7b72c91d8e60103e8da7999cefbc63d (diff) | |
parent | 3de369fd696e6b98d00259d3c759d9b81df4e84b (diff) | |
download | podman-0b05ba808d5e2fc75ce10b23405bd5c05da2c331.tar.gz podman-0b05ba808d5e2fc75ce10b23405bd5c05da2c331.tar.bz2 podman-0b05ba808d5e2fc75ce10b23405bd5c05da2c331.zip |
Merge pull request #10241 from containers/dependabot/go_modules/github.com/onsi/gomega-1.12.0
Bump github.com/onsi/gomega from 1.11.0 to 1.12.0
Diffstat (limited to 'vendor/github.com/onsi/gomega/gbytes/buffer.go')
-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 { |