awnumar/memguard

Why is there no `Size` method?

shaleh opened this issue · 2 comments

My use case is allocating a buffer and then copying chunks into it using CopyAt. But it is hard to implement an append operation external to the object since the user does not know where the end of the buffer lies.

The underlying container.buffer has the value needed. We just need to expose it.

There is one implemented in #38.

In the meantime, a simple len(b.Buffer()) should work fine.

Thank you.