The "Magic" Behind Go's cap() Function
If you’ve written any Go code, chances are you’ve used the built-in functions len() and cap(). At first glance, len() is straightforward - it tells you how many elements a slice currently holds. But cap()? That one feels a little mysterious.
Why does...
kandycoder.hashnode.dev4 min read