---
title: "Using eBPF from Go"
publication: "Go Weekly"
issue: 384
published_at: "2021-10-22"
canonical_url: "https://golangweekly.com/issues/384"
---

Plus file walking, why not to make up domain names, and some Go books to check out. |        

#​384 — October 22, 2021 

[Unsubscribe](https://golangweekly.com/leave/*|UID|*)|[Read on the Web](https://golangweekly.com/issues/384)   

Go Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/mxia115xlqsxiekzjfcr.jpg)](https://entgo.io/blog/2021/10/19/sqlcomment-support-for-ent/)   

[Introducing sqlcomment: Database Perf Analysis with Ent and Google's Sqlcommenter](https://entgo.io/blog/2021/10/19/sqlcomment-support-for-ent/) — [Ent](https://entgo.io/) is an entity framework that acts as an ORM for modeling and querying data in and from Go. It’s worth investigating on its own merits, but this post looks at an interesting next step using Google’s [Sqlcommenter](https://cloud.google.com/blog/topics/developers-practitioners/introducing-sqlcommenter-open-source-orm-auto-instrumentation-library) tool to bridge the gap between ORM and understand database performance by way of usefully verbose SQL comments. 

Amit Shani (Ent)   

▶[Discussing eBPF and Go](https://changelog.com/gotime/201) — eBPF provides a sandbox that can run code inside the Linux kernel and it’s [pretty awesome](https://filipnikolovski.com/posts/ebpf/)– we’ve linked to tutorials about [using eBPF from Go](https://networkop.co.uk/post/2021-03-ebpf-intro/) before, but this is an hour-long chat about the possibilities. 

Go Time Podcast podcast   [![\](https://copm.s3.amazonaws.com/0e521ece.jpg)](https://bridgecrew.io/resource/the-devsecguide-to-iac-1/?utm_medium=sponsorednewsletter&utm_source=gonews&utm_campaign=gon211022&utm_content=dsgiac) 

[The DevSecGuide to Infrastructure as Code](https://bridgecrew.io/resource/the-devsecguide-to-iac-1/?utm_medium=sponsorednewsletter&utm_source=gonews&utm_campaign=gon211022&utm_content=dsgiac) — Research on the state of IaC security, practical steps for building a DevSecOps culture, and tips for embedding security throughout the DevOps lifecycle. 

Bridgecrew sponsor   

[Building Rich CLI Apps with Go's Built-in Templating](https://lakefs.io/building-rich-cli-applications-with-gos-built-in-templating/) — How the developers of a CLI tool extend the `text/template` package to enable richer output. 

Barak Amar   

[You Don't Need a Library for File Walking in Go](https://engineering.kablamo.com.au/posts/2021/quick-comparison-between-go-file-walk-implementations) — Before 1.16, walking file trees incurred a level of overhead that led to multiple open-source packages trying to solve the problem, but now Go’s shoes are better made for walking. 

Ben Boyter   

**QUICK BITS:** 

- A reminder to not just make up dummy domain names for examples, [since one included in the Go standard library](https://github.com/golang/go/issues/48886) inadverently turned out to contain adult content – `example.com` is what you really need.
- A reader has written in about his new book [Build a Blockchain from Scratch in Go](https://web3coach.gumroad.com/l/build-a-blockchain-from-scratch-in-go) – we haven't reviewed it yet, but you can get a feel for it in [this tutorial](https://www.freecodecamp.org/news/build-a-blockchain-in-golang-from-scratch/).
- In other book news, the third edition of [Mastering Go](https://www.amazon.com/Mastering-Go-professional-utilities-concurrent/dp/1801079315) by Mihalis Tsoukalos and published by Packt Publishing is now out.      

Jobs  

[Senior Software Engineer, Platform | Remote within US Timezones | Full-Time](https://grnh.se/caf836d01us) — Build the platform our teams use to ship innovative telehealth and workflow tools for over 1.8 million clinicians. 
Doximity   

[Senior Software Engineer (Go) - 100% Remote, UK/EU Only](https://www.form3.tech/careers/job-application?gh_jid=4003519002) — Solve complex technical challenges using the latest, cloud-native technologies to help Banks and FinTechs move money faster. 
Form3   

[Find a Job Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-golangweekly%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 
Hired      

[How to Schedule a Task at a Specific Time in Go](https://stephenafamo.com/blog/posts/how-to-schedule-task-at-specific-time-in-go) — I’ve never needed to do this at this level, but it’s nice to have the option.. 

Stephen AfamO   

[Build Serverless Apps with Go and Custom Handlers on Azure](https://docs.microsoft.com/en-us/learn/modules/serverless-go/) — An 8-unit tutorial on creating Azure Functions using Go. The units are short, though, so this is quickly consumable. 

Microsoft   

[Why You Should Use Dedicated Constructors in Go](https://web3.coach/golang-why-you-should-use-constructors) — Go’s aim for simplicity can, sometimes, lead to problems as a codebase grows. This tip will definitely keep your structs flexible and your future self less frustrated. 

Lukas Lukac   

[Why Network Engineers Should Learn Go](https://darrenparkinson.uk/posts/2021-10-13-why-network-engineers-should-learn-go/) 
Darren Parkinson  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/mlx5gi8rfqsw278e9ybg.jpg)](https://github.com/Shopify/toxiproxy)  

[Toxiproxy 2.2: A TCP Proxy to Simulate 'Chaotic' Network and System Conditions](https://github.com/Shopify/toxiproxy) — A tool you can use to see how your app copes with outages in third party APIs, databases, network accessible caches, etc. It’s written in Go but there are client libraries for numerous languages to use it from test suites. 

Shopify   

[panicparse: A Panic Stack Trace Parser and Debugging Tool](https://github.com/maruel/panicparse) — _“Crash your app in style”_(!) This tool, which you’d use to help in debugging crashes and deadlocks in heavily parallelized processes, has just been updated to support Go 1.17. 

M-A   

[Slug 1.11.0: URL-Friendly Slug Creator with Multiple Language Support](https://github.com/gosimple/slug) — For example: `slug.Make("Hellö Wörld хелло ворлд")` creates `"hello-world-khello-vorld"`. 

GoSimple   

[Build Video for Your Go App That Just Works](https://mux.com/live/?utm_campaign=q4_sponsored_newsletters_21&utm_source=goweekly&utm_medium=cooperpress&utm_content=live) 

Mux sponsor   

[UUID 4.1.0: A Pure Go Implementation of UUIDs](https://github.com/gofrs/uuid) — Create and parse UUIDs as defined in [RFC-4122](https://tools.ietf.org/html/rfc4122) covering versions 1, 3, 4 and 5. 

The Go Commune   

[RoadRunner 2.5: A High Perf PHP Application Server and Load Balancer](https://github.com/spiral/roadrunner) — A PHP app server, load balancer and process manager. Includes a PSR-7/17 compatible HTTP and HTTP/2 server and can replace a Nginx+FPM setup. 

Spiral Scout   

[MacDriver 0.2: Native Mac API Access for Go](https://github.com/progrium/macdriver) — A toolkit for working with Apple/Mac APIs and frameworks in Go formed of both bindings for Objective C and wrapped versions of certain frameworks. 

Jeff Lindsay   

[Chroma 0.9.4: A Pure Go General Purpose Syntax Highlighter](https://github.com/alecthomas/chroma) — Brings most of the features of [Pygments](https://pygments.org/) to Go. 

Alec Thomas   

[sqlhooks 2.0: Attach Hooks to Any `database/sql` Driver](https://github.com/gchaincl/sqlhooks) — An unobtrusive way to instrument SQL queries. 

Gustavo Chaín   

[pgmetrics 1.12: Collect and Display Stats from Running Postgres Servers](https://pgmetrics.io/) — Written in Go, and here’s [an example of its output.](https://pgmetrics.io/docs/index.html#example) v1.12 adds Postgres 14 and PgBouncer 1.16 support, including collecting new PG14 specific stats. [GitHub repo](https://github.com/rapidloop/pgmetrics). 

RapidLoop   

[go-imap 1.2: An IMAP4 Library for Clients and Servers](https://github.com/emersion/go-imap) 
Simon Ser         

Curated by [Glenn Goodrich](https://twitter.com/ruprict) and [Peter Cooper](https://twitter.com/peterc). 

[Change your email address](https://golangweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
