r/golang2 • • Jul 16 '26

Kern - A fast Go web framework on net/http.

1 Upvotes

https://gokern.vercel.app/

Kern – a lightweight Go web framework with a small, trusted core

I've been working on a Go web framework called kern (short for kernel). The idea is a small, composable core that embraces net/http instead of hiding it.

What makes it different?

- Go 1.22+ native routing via http.ServeMux – no third-party router dep in core

- Dual path param syntax – both :param and {param} work interchangeably

- Named routes & route constraints – typed path params like kern.UintPathConstraint

- Route-specific middleware – AddConstraints() per route, no group nesting needed

- Built-in auth – BearerAuth / BasicAuth ship in core

- Structured binding – Bind() / BindQuery() / BindForm() / BindHeader() with struct tags

- File handling – multipart upload, download, streaming with range support

- Conditional requests – ETag, Last-Modified, If-None-Match / If-Modified-Since

- Built-in test client – kern.NewTestClient(app) without a real HTTP server

- Context pooling for lower allocation pressure

Zero core dependencies. The runtime package pulls in nothing outside the stdlib.

Inspiration came from Flask's minimal API surface, Javalin's fluent/no-reflection design, and the microkernel philosophy – small trusted core, optional modules around it.

It's not trying to be the biggest framework – just a dependable core to build on for years.

Would love feedback from anyone who's rolled their own or thought about what a minimal Go framework should look like.

https://github.com/mobentum/kern


r/golang2 • • Jul 11 '26

My first project in go!😄

2 Upvotes

This is a Tic-tac-toe game that made myself. I know it is simple and basic project but this tech me more that a full video of Golang.

I'm thinking about my next project, but I don't know what I should build.

what is for you the best project to do?


r/golang2 • • Jul 10 '26

path-tagger – A zero-dependency CLI to inject absolute repo paths into files for perfect AI context

1 Upvotes

r/golang2 • • May 22 '26

Cosmo - Real-time PostgreSQL TUI Dashboard (v0.2.0)

2 Upvotes

r/golang2 • • May 22 '26

making a package manager in golang

Thumbnail reddit.com
0 Upvotes

r/golang2 • • May 20 '26

I made a clean, generic, zero-dependency matrix math package for Go.

Thumbnail reddit.com
1 Upvotes

r/golang2 • • Apr 04 '26

go-cabinet: Pure Go Microsoft Cabinet (.cab) file reader and writer

1 Upvotes

Hey folks, I recently released go-cabinet, a pure Go library for reading and writing Microsoft Cabinet files commonly used in Windows distributions and installers. The design is heavily inspired by archive/zip from the Go standard library, including full io/fs integration - the reader implements fs.FS to integrate with functions like fs.WalkDir, and the writer provides an AddFS method to add a whole fs.FS to a Cabinet archive in one go.

The library currently supports uncompressed and MS-Zip compression formats out of the box. While LZX and Quantum methods are not natively included yet, the API allows you to register custom compressors and decompressors as needed.

Check it out at https://github.com/abemedia/go-cabinet and if you do use it I'd love to hear your feedback.


r/golang2 • • Mar 17 '26

This Go library streams a 287 MB CSV file using only 3 MB of memory

Thumbnail
github.com
1 Upvotes

Found this open source Go library called Vortex that caught my attention

because of the benchmark numbers.

Processing a 287 MB CSV file the normal way in Go loads the entire file

into memory first. Vortex streams it one row at a time instead.

Real benchmarks on 1,000,000 rows (Windows):

Eager loading: 287 MB peak memory

Vortex: 3 MB peak memory —> 95x less

And it scales flat a 10M row file still uses 3 MB. A 100M row file

would crash an eager approach. Vortex handles it fine.

Works with any io.Reader local files, HTTP responses, multipart

uploads all work without any changes to your code.

Built on Go 1.23's iter.Seq and iter.Seq2 interfaces.

Zero external dependencies. Race tested.

GitHub: [https://github.com/MostafaMagdSalama/vortex](https://github.com/MostafaMagdSalama/vortex)

Docs: [https://pkg.go.dev/github.com/MostafaMagdSalama/vortex](https://pkg.go.dev/github.com/MostafaMagdSalama/vortex)


r/golang2 • • Mar 11 '26

gocondense: a code formatter that condenses noisy Go code

Thumbnail
reddit.com
2 Upvotes

r/golang2 • • Mar 08 '26

Introducing Goclaw (yes another claw)

Thumbnail
reddit.com
2 Upvotes

r/golang2 • • Feb 18 '26

A cookiecutter for bootstrapping MCP servers in Go

Thumbnail
reddit.com
2 Upvotes

r/golang2 • • Feb 02 '26

Java 25 vs Go 1.25

Thumbnail reddit.com
1 Upvotes

r/golang2 • • Jan 30 '26

2025 Go Developer Survey Results

2 Upvotes

This blog post was written by a member of the Go Team recently. To see the results, summaries and conclusions, see below.

https://go.dev/blog/survey2025


r/golang2 • • Dec 20 '25

Hash tables in Go and advantage of self-hosted compilers

Thumbnail
rushter.com
1 Upvotes

r/golang2 • • Dec 10 '25

If you're tired of me messing with self-signed certificates, then I decided to write a mini pki to solve this problem. I called it TLSS.

1 Upvotes

Hello, I'm a DevOps engineer and I'm creating a small project for myself to work with certificates, to ensure their simple creation through a web interface or API (in progress). The main idea is to conveniently maintain various types of certificates and the simplicity of centralized "pocket" storage.

From the main features:

  1. Everything is stored in a small and fast SQLite database.

  2. All keys in the database are encrypted.

  3. Simple backup and data portability, just save the database file.

  4. Management is carried out through a web interface.

Supported:

  1. Creation/revocation/automatic recreation of server certificates (regular and wildcard).

  2. Creation/revocation/automatic recreation of client certificates (regular and wildcard).

  3. Adding unique OID for more precise filtering.

  4. Automatic certificate copying mechanism to server and recreation.

  5. Creation of objects not linked to servers.

  6. Recreation and validity control.

  7. CRL generation.

  8. Reissuance of CA with recreation of all dependent objects.

  9. SSH key generation.

  10. All certificates can be extracted at any time.

Currently, I'm working on API, adding external CA, SSH keys and bug fixes, and I'd be glad to hear your suggestions.

I hope it will be useful to someone, enjoy using it!

Distributed under MIT license. https://github.com/addspin/tlss


r/golang2 • • Nov 17 '25

Introducing GONK – an ultra-lightweight, edge-native API Gateway (single <20MB binary, no deps)

Thumbnail
github.com
3 Upvotes

Hey everyone! I’ve been working on something I think a lot of people here might appreciate — especially if you’re into self-hosting, edge computing, IoT, or just hate bloated infra.

What is GONK? GONK is an ultra-lightweight, privacy-first, edge-native API Gateway written in Go. It’s built for environments where traditional gateways (Kong, Envoy, Traefik, Nginx) are too heavy, too complex, or too cloud-dependent.

Think factory floors, air-gapped networks, Raspberry Pis, industrial devices, or minimal microservice stacks.

  • Single binary <20MB

  • No external dependencies

  • No telemetry, no phone-home

  • Runs fast even on a Pi

Why I built it Most gateways today assume:

you have Kubernetes

you have a cloud control plane

you don’t care about resources

you’re okay with telemetry and phoning home

But in industrial and IoT environments, this is unacceptable. People need something simple, transparent, offline, and extremely efficient.

So I built GONK with a few core principles:

Edge-first

Privacy-first

Minimal resource usage

Enterprise-grade features without enterprise complexity

Features (highlights) Protocols

HTTP/1.1, HTTP/2, HTTPS

WebSocket (ws/wss)

gRPC proxying

Automatic protocol detection

Routing

Path-based routing (/api/*)

Header and method-based routing

Virtual hosts

Route priorities + weights

Security

Built-in JWT validation (HS256/RS256)

API Key authentication

Per-route and global rate limiting

CORS per route

Performance & Resilience

Circuit breakers

Retries with backoff

Response caching

Connection pooling

Hot reloadable config

Observability

Prometheus metrics

Structured logging

Request tracing & correlation IDs

Health endpoints

Transformations

Add/remove headers

Path rewriting/stripping

Query injection

Dynamic variables (${request_id}, ${remote_addr}, etc.)

Benchmarks Raspberry Pi 4 (4GB)

10,325 req/s HTTP proxy

5,500 req/s with JWT validation

~2ms avg latency on 1000 WebSocket clients

~47MB memory under heavy load

~12MB idle

Intel i7-9700K

115,839 req/s with caching enabled

~48MB RAM at 10K req/s sustained

It’s not meant to beat Nginx in raw throughput, but it runs close while using a fraction of the resources.

Example Configuration (simple) server: listen: ":8080"

routes:

  • name: "api" path: "/api/*" upstream: "http://backend:3000" strip_path: true

Start it with:

./gonk -config gonk.yaml

Docker / Kubernetes There’s a Docker image (ghcr.io/JustVugg/gonk) and a basic Kubernetes deployment + Helm chart available.

Use cases

Edge IoT gateway on Raspberry Pi / Jetson

Industrial environments (air-gapped)

Lightweight microservice gateway

WebSocket fanout layer

API monetization (per-client rate limits)

“Local cloud” setups in homelabs

Feedback welcome! I built GONK because I needed a gateway that:

doesn’t need a database

doesn’t need a control plane

doesn’t eat 500MB of RAM

doesn’t phone home

doesn’t require learning Envoy’s 1,200-page config model

If this sounds interesting, let me know what features you'd want next. Happy to answer questions or hear critiques!


r/golang2 • • Nov 06 '25

Building a simple terminal-based log viewer in Go (eventually evolving into a text editor).

3 Upvotes

Hello everyone, So I am new to Go, but not new to programming. I am a software engineer working with JS. I am now transitioning to Go for a low level system experience as well as backend engineering. I am currently working on a simple log/file viewer for myself. My VSCode crashes when I open large server logs, so to solve this is issue I using glogg for opening logs but now I am thinking of building a simple tool for myself. So I tried making one, though it's very basic at the moment, I am currently implementing features like pagination, scrolling, searching or highlighting. Also later will be coverting it to a simple terminal text editor too. So any suggestions or feedback is highly welcome.

P.S. - GitHub link for the project : https://github.com/HarshDev1809/log-go


r/golang2 • • Oct 27 '25

A high-performance Go client for the Gotenberg HTTP API with a fluent interface. Built using only the Go standard library (via http-client).

2 Upvotes

Gotenberg Client

https://github.com/nativebpm/gotenberg

Go client for Gotenberg — document conversion service supporting Chromium, LibreOffice, and PDF manipulation engines.


r/golang2 • • Oct 27 '25

Fluent HTTP client for Go with streaming support and zero dependencies.

2 Upvotes

httpstream - Stream-first HTTP client for Go

Efficient, zero-buffer streaming for large HTTP payloads — built on top of net/http.

https://github.com/nativebpm/httpstream


r/golang2 • • Oct 18 '25

Velaros - A framework for WebSocket based Applications

Thumbnail github.com
2 Upvotes

So I've been involved in a number of projects that use web sockets. I've always found it somewhat annoying that HTTP has so many great patterns for organizing logic into handlers and paths, but everyone hand rolls their own patterns for web sockets. Many projects later I decided to codify a pattern that would allow for the benefits of by-directional web sockets connections, without the mess. I created Velaros for this purpose. I'll share it here with you, and look forward to hearing what you all think.


r/golang2 • • Sep 25 '25

How to detect a slow memory leak in golang binary??

Thumbnail reddit.com
3 Upvotes

r/golang2 • • Nov 21 '24

Seeking Feedback on my Golang Unit Testing Article

2 Upvotes

Hey Everyone, I recently published a medium article on Go Unit Testing patterns, I'd love to hear your thoughts and any feedback you have. Check it out and let me know what you think!
https://medium.com/@OTS415/3-simple-patterns-for-better-go-unit-testing-0ae227ed1f5d