libbpfgo-example
Check out selftests in libbpfgo for more (and more up-to-date) examples: here
This is an example of writing a small program with libbpfgo, a Go wrapper for libbpf.
To build simply run make
and run the resulting libbpfgo-prog
binary.