Golang Project Structure

Tutorials, tips and tricks for writing and structuring code in Go (with additional content for other programming languages)

structs

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 […]