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>
This commit is contained in:
dependabot[bot]
2021-05-06 08:07:07 +00:00
committed by GitHub
parent 9b9bd9e0e7
commit 3de369fd69
115 changed files with 11645 additions and 1391 deletions

View File

@@ -108,6 +108,22 @@ func (b *Buffer) Read(d []byte) (int, error) {
return n, nil
}
/*
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
*/