//go:embed unleashed

Originally published on Medium: https://dariodip.medium.com/go-embed-unleashed-1eab8b4b1ba6 One of the reasons why I love Go is that Go compiler creates static binaries by default unless you use cgo to call C code, in which case it will create a dynamically linked library. It makes it easy to ship Go programs, create very lightweight Docker images and exploit cross-compiling and plugins. Starting from Go 1.16, it also gives you the opportunity to ship your own “batteries” using the package embed. ...

April 3, 2021 · 5 min · Dario Di Pasquale

False Sharing — An example with Go

Originally published on Medium: https://dariodip.medium.com/false-sharing-an-example-with-go-bc7e90594f3f False Sharing — An example with Go Diving in multiprocessor programming is never easy, I know. Unfortunately for you, you should understand much about computer architecture to do it effectively. This post will go deep into computer architecture, trying to explain one of the most insidious problems that we may encounter when we do multiprocessor programming: false sharing. False Sharing: an example in Go Let’s implement a simple counter interface. ...

March 27, 2021 · 6 min · Dario Di Pasquale

Data structures with Go - Part II

Data Structures With Go - Part II This page has been migrated to Medium In the previous post we discussed how to implement linear data structures with Go. Now we will explore two more complex data structures: tree and graph. Those structures are not Linear and can represent unstructured information. Both graphs and trees are the foundation of the graph theory and both can be used, essentially, to describe a kind of relation. ...

January 10, 2020 · 8 min · Dario Di Pasquale

Data structures with Go - Part I

Data Structures With Go - Part I This page has been migrated to Medium Data structures are everywhere. Every developer should know them, starting from the most common ones. The data structure priorly describes how the data is organised, accessed, associated and processed. Using data structures you can keep your data in memory and efficiently access them. You should pick the data structure that is the most suitable for your purposes to minimize space in memory and access time. ...

January 3, 2020 · 12 min · Dario Di Pasquale