Skip to main content
Image

r/golang


Looking to make some friends so we can work through "Distributed Services With Go" and build cool stuff
Looking to make some friends so we can work through "Distributed Services With Go" and build cool stuff

Hi there.

I'm looking to pivot to SWE from Data Science (I'm early in my career), and I have an interest in decentralised networks and P2P systems in particular.

I'm working through "Distributed Services With Go" to build up some knowledge of distributed systems (I know it's far from a complete resource) more generally.

I'm aware that this is a tough enough sub-field that getting real knowledge in it is a massive undertaking, especially for someone who lacks work experience. I'm not expecting that learning this stuff will increase my chances of getting hired. However, I've decided to work through the book anyway out of interest.

If anyone shares my interests and would like to work through it with me, or potentially work on related projects afterwards, please DM me.


Claude Code is genuinely useful for legacy code issues. It connected to my GitHub, read the full project, diagnosed the performance problems in my JavaScript filter, and rewrote it with cleaner logic. Faster load time and new functionality — without me having to trace through old code manually.
media poster


gpdf — Zero-dependency PDF generation library for Go, 10-30x faster than alternatives
gpdf — Zero-dependency PDF generation library for Go, 10-30x faster than alternatives
show & tell

Hey r/golang, I've been building gpdf, a PDF generation library written in pure Go with zero external dependencies.

The problem

gofpdf is archived, maroto's layout is limited, and most serious solutions end up wrapping Chromium (hello 300MB binary and slow cold starts) or require commercial licensing. I wanted something fast, dependency-free, and with a real layout engine that treats CJK text as a first-class citizen.

What it does

  • Full layout engine — Bootstrap-style 12-column grid system

  • Declarative Builder API — chainable, no XML/JSON templates needed

  • TrueType font embedding with full Unicode / CJK support

  • Images, tables, headers/footers, page numbering

  • Flexible units (pt / mm / cm / in / em / %)

What makes it different

  • Zero dependencies — stdlib only, no CGo, no wrappers. go get and you're done

  • Fast — 10–30x faster than comparable libraries in benchmarks. A typical invoice generates in under 1ms

  • CJK-first — Japanese, Chinese, Korean text just works. Most Go PDF libs treat this as an afterthought

Quick example

doc := gpdf.New(gpdf.WithPageSize(gpdf.A4))
doc.Page(func(p *gpdf.PageBuilder) {
    p.Row(func(r *gpdf.RowBuilder) {
        r.Col(6, func(c *gpdf.ColBuilder) {
            c.Text("Invoice #1234", text.Bold())
        })
        r.Col(6, func(c *gpdf.ColBuilder) {
            c.Text("2026-03-22", text.AlignRight())
        })
    })
})
buf, _ := doc.Generate()
os.WriteFile("invoice.pdf", buf, 0644)

Repo: github.com/gpdf-dev/gpdf Docs: gpdf.dev

Feedback and contributions welcome — especially interested in what layout features you'd want most.


Go patterns which makes sense to do early
Go patterns which makes sense to do early
newbie

I see a lot of opinionated patterns out there. But they are mostly too complex for a new project and can lead to early over-engineering.

What are those that's are important to start of early. Those that'd cost if afterthoughted.

I depend entirely on std as i am expanding my skills and understand the Go way (aka idioms). Some of the things i do think are a must are: DI, interfaces for abstraction and ofcourse using std for common tasks.