Golang Project Structure

Tips and tricks for writing and structuring Go code

memory

Tag

How to Make Go Structs More Efficient

A small yellow car is shown in a huge parking space. Either side of it are two huge white buses.

It may be surprising to learn that two Go structs can contain exactly the same fields and yet one can require more — or less — memory than the other. Since we generally want to ensure that we never use more memory than required, we are going to look at a technique called structure packing […]