A risky dependency and how AI helped me remove it

A single line in go.mod can pull in code from a vendor you would never trust on purpose. Your project may depend on the russian-maintained mailru/easyjson without ever choosing it, buried several levels deep in the dependency graph of popular Go libraries.

This is a real risk, because the dependencies you did not pick are the ones you never check.

In this post, I show how I found one such indirect dependency in a chain of popular libraries, and how a single prompt to Claude helped me remove it.

Renovate PR on oapi-codegen that removes the mailru/easyjson dependency

TL;DR: oapi-codegen depended on mailru/easyjson without asking for it directly. The dependency came through getkin/kin-openapi, which used perimeterx/marshmallow, which used easyjson. I asked Claude if marshmallow was really needed, it was not, and a few PRs later the dependency was gone from the whole chain.

[Read More]

Fixing a panic in 'go run' command

Have you found bugs in tools that you are using? Recently, while working on some google/go-github issues, I discovered a panic in go run. It happened when I forgot to provide an argument to the -C flag.

Screenshot of the panic in go run -C

This article explains how I found and fixed the bug in go run -C and go install -C, added tests to prevent future regressions, and how my fix was successfully accepted into the Go repository.

[Read More]

How I simplified go-github for millions

How can a simple contribution to a library impact thousands of programs around the world? And why will this change become obsolete after the Go 1.26 release? These and a few other questions I’ll answer in detail in this post.

TL;DR: I replaced four helper functions (String, Bool, Int, Int64) with a single generic Ptr[T] function in google/go-github , affecting 10K+ projects. Ironically, Go 1.26’s enhanced new builtin will make this pattern unnecessary.

Screenshot of the Ptr function
[Read More]

Upgrading Golangci-lint to v2

Golangci-lint v2 was released in March 2025 , bringing major architectural improvements and a cleaner configuration format. Despite being available for over seven months, adoption remains low.

If you are maintaining a Go project, now is the time to upgrade. This article covers why you should make the switch and provides a step-by-step walkthrough using a real-world project.

Screenshot of Golangci-lint v2 website (dark theme)
[Read More]

Found a group of malicious Go projects injected with trojan

I accidentally discovered malicious programs in the Go ecosystem that impersonate legitimate tools such as the linter ldez/usetesting , the HCL editor go.mercari.io/hcledit , the official MailerSend Go SDK mailersend/mailersend-go , and many more. These programs are not very popular but are still used by some developers. By the time I wrote this article, I had reported the malicious repositories to GitHub support, and most of them have been deleted.

VirusTotal scan results for the trojan `f0eee999`
[Read More]