finds.dev← search

// the find

boombuler/barcode

★ 1,553 · Go · MIT · updated Jul 2025

a barcode creation lib for golang

Pure-Go library for generating barcodes and QR codes as Go `image.Image` values — no CGO, no external dependencies. Covers the full range of common formats from Code 128 to PDF417. If you need to emit a barcode from a Go service without shelling out to a CLI tool, this is the straightforward pick.

Each symbology lives in its own subpackage with its own tests, so the code is easy to audit or vendor selectively. The output is a standard `image.Image`, meaning it plugs directly into `image/png`, `image/jpeg`, or any drawing library without an adapter layer. Reed-Solomon and Galois field math are implemented from scratch in `utils/`, which is educational and avoids a dependency on a crypto or math library. Test coverage is consistent — every encoder has a corresponding `_test.go` with round-trip checks.

The README example silently discards errors with `_` — bad habit to model for users, especially since `Scale` returns a new barcode that can fail. No SVG output: everything renders to a raster image, so if you need vector output for print workflows you're generating a PNG and hoping the DPI is right. The GoDoc link still points to the deprecated godoc.org rather than pkg.go.dev. Maintenance is slow — 184 forks suggests active use, but PRs and issues don't move fast, so if a format has a bug you're probably patching it yourself.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →