r/golang • u/AutoModerator • 1d ago
Small Projects Small Projects
This is the weekly thread for Small Projects.
The point of this thread is to have looser posting standards than the main board. As such, projects are pretty much only removed from here by the mods for being completely unrelated to Go. However, Reddit often labels posts full of links as being spam, even when they are perfectly sensible things like links to projects, godocs, and an example. r/golang mods are not the ones removing things from this thread and we will allow them as we see the removals.
Please also avoid posts like "why", "we've got a dozen of those", "that looks like AI slop", etc. This the place to put any project people feel like sharing without worrying about those criteria.
2
u/SR-G 15h ago
I recently made a few tools, in GOLANG, for my homelab usage and around docker (more to come). With the UNIX principle - one tool, one usage.
First one is called docker-base-watch, it's a CLI tool only doing one thing : detecting if some (one or many) parent images have newer versions. I use this in my homelab scripts, to know which images i need to rebuild/redeploy [1]
Second one is called simple-docker-healthcheck, it's a single binary usable in HEALTHCHECK commands, in order to monitor various kind of things. It allows to homogeneize the way you write your commands (no need of curl, grep, netstat, nc, shells, ...), and (and that's why i wrote this) it allows to easily be embedded in distroless containers (when there is even no shell) [2]
Source code, documentation, binaries/docker images are available on GITHUB/ghcr.io
[1] : https://github.com/SR-G/docker-base-watch [2] : https://github.com/SR-G/simple-docker-healthcheck
2
u/dumindunuwan 1d ago edited 1d ago
Quite finalizing this series and mostly will share as a separate post around Wednesday.
https://learning-cloud-native-go.github.io/docs/building-a-containerized-restful-api/
If anybody wanna check Rust version(Added 2026): https://learning-rust.github.io/labs/building-a-containerized-restful-api/
Since 2019; Hope admins allow me to share this as a separate post without auto delete it while posting
2
1
u/piwi3910uae 15h ago
I ported the Vercel AI SDK (TypeScript) to idiomatic Go: https://github.com/azrtydxb/go-ai-sdk
- One provider-agnostic API across 39 providers (OpenAI, Anthropic, Google, Mistral, Bedrock, Vertex, Cohere, DeepSeek, ...): generate/stream text, structured objects, tool calls, embeddings, images/speech/transcriptions.
- Native Go, not a TS mirror: context.Context, iter.Seq for streaming, generics for structured output, typed errors (errors.As on 4xx/5xx).
- Zero dependencies in the root module (OpenTelemetry bridge is an opt-in sub-module).
- MCP client (stdio + Streamable HTTP, elicitation, sampling, roots) in-tree.
Feedback welcome, especially on the streaming design (iter.Seq + context cancellation).I ported the Vercel AI SDK (TypeScript) to idiomatic Go: https://github.com/azrtydxb/go-ai-sdk • One provider-agnostic API across 39 providers (OpenAI, Anthropic, Google, Mistral, Bedrock, Vertex, Cohere, DeepSeek, ...): generate/stream text, structured objects, tool calls, embeddings, images/speech/transcriptions. • Native Go, not a TS mirror: context.Context, iter.Seq for streaming, generics for structured output, typed errors (errors.As on 4xx/5xx). • Zero dependencies in the root module (OpenTelemetry bridge is an opt-in sub-module). • MCP client (stdio + Streamable HTTP, elicitation, sampling, roots) in-tree. Feedback welcome, especially on the streaming design (iter.Seq + context cancellation).
1
u/duckydude20_reddit 12h ago
i made simple assertion library, https://github.com/sku0x20/assertgo
its assertJ style. i really how api came out.
not that big project, trying to find ideas to add channel support.
1
1
u/No_Bodybuilder_2110 1d ago
I created gofastr to reduce the footprint of my web development locally and deployed (node developer during the day) and push how much I knew and didn’t know about web development. It is 100% ai coded but 90% human decided and guided
Please go and break it!
1
u/sigmoia 1d ago
Using this to schedule all kinds of one shot and recurring jobs.
I wanted a portable cron scheduler that doesn't depend on system crond. This is a super small tool that myself and a few of my colleagues at work have been using for a while.
It let's you manage the daemon via systemd or launchd but doesn't depend on them strictly.
0
0
u/v_muk_t 1d ago
Redis clone, different from the popular goLang tutorial.
Hi all! Back in April, I started working on a Redis clone. This tutorial (https://www.build-redis-from-scratch.dev/en/first-steps) was really helpful to begin with, but then I kept adding to it as I was planning to make this my portfolio project (I am currently a Junior and actively looking for summer 2027 internships. No luck yet).
Here is a list of what I have done differently:
Wrote the hash table. MurmurHash3 hash func, separate chaining, and Redis's progressive rehashing
Lock striping instead of one singular RWMutex. With one lock, my store was not scaling well. After lock striping, I was able to get way better benchmark scores. Single mutex at 8 cores was 3.4x slower than at 1 core and striping fixes that completely.
TTL instead of persistance
Benchmarked against the real redis server. Scored within 13% for GET and SET.
The clone also supports 14 different commands as of now.
As I have said above, I am a CS Junior with no real production experience in Go. Will really appreciate if you have some suggestions or opinions about the project. I am also planning to make it distributed in the future.
Repo: https://github.com/b-mozz/redis-go
The readme file has more details. Consider leaving a star if you like it. Thank you!
0
u/vishalshinde02 23h ago
For preparing for job switch to Go Backend Developer, I am building this Log ingestion and aggregator tool using Postgres, Rabbitmq, Grafana.
This has pgxpool, worker pools, graceful shutdown, rabbitmq queues, DLQs, sqlc, goose.
I have challenges on some things.
1. Client end i.e. How will the incoming services send me the logs without much hassle?
For now I have used fluentbit on producer side to push logs, but it is not refined.
2. Easy self-hostable config.
Please anyone give suggestions/feedback.
https://github.com/sudovishal/vortexlog
0
0
u/titpetric 22h ago
I am cleaning up the last few years of custom linting tools focused on internal software composition and various checks of go apps into a single linter tool that can also avoid the go ast parser, download and compile of packages, handle old source without go.mod. Part of it is trying to run these linters for a public health check and trying not to be resurce intensive.
Writing two other things right now:
in process telemetry with https://github.com/titpetric/oida (pending a release that adds logging)
phpscript go vm https://github.com/titpetric/phpscript (adding new bindings, using for a few website projects, a sql management tool in ./demos/dbadmin, like "phpmyadmin" but db agnostic (sqlite, pgsql, mysql, whatever sql driver gets imported). Other projects like a php playground and various complex/big website projects. Trying to answer if coding agents are better at building php scripts while having a go runtime, the idea is they do well with smaller context and less toks/output. Removed inheritance as a design choice, the LLMs implemented it twice without asking. 🤣
If anyone is interested to contribute in some way, gh issues are open. Disclaimer: I use claude in various ways and try to gatekeep it with tests, tooling, and common sense and low trust..
0
u/lucas-dotcom 12h ago
I keep getting handed legacy Postgres databases where the foreign keys were never declared. The relationship is there in every row, there's just no constraint, so nothing ever stopped bad rows from getting in. Got tired of writing the same throwaway queries to find them and built a CLI for it.
It's read-only, since it gets pointed at production databases owned by people who are nervous about it. Two things that fell out of that constraint:
- The dependency count is treated as a product requirement, not an implementation detail. 6 direct deps, 25 modules in the linked binary, ~11 MB on linux/amd64, no cgo. Adding one means putting its measured cost in the PR description.
- "No value from a user's table ever reaches output" is enforced by a test rather than by code review. It fills the model with sentinel values shaped like sensitive data, serializes anything that can leave the core, and fails if a sentinel survives.
Would appreciate feedback on:
- How do you enforce a dependency budget, if you enforce one at all?
- Any better approach than sentinel tests for "this must never be emitted" guarantees?
1
u/KATO-Kanryu 1h ago
I've been working on Hike (hike-lang), an experimental systems language that pairs Go-like syntax with a zero-overhead LLVM IR backend (no GC, no runtime scheduler).
The compiler (hikec) is written in Go. Instead of generating machine code directly, it acts strictly as an LLVM IR frontend and delegates optimizations (-O3), platform-specific binary formatting, and linking to Clang.
Current Features:
- Go-inspired syntax (type inference
:=, multi-returns, slices, monomorphized generics) - C-ABI shared library export (
.dll/.so) with automatic C/C++ header (.h) generation - Stack-allocated 2-pass iterators for custom containers (zero heap allocation during
for-range) - Closures with escape analysis (stack-promoted to heap only when escaping)
- Standalone
wasm32-unknown-unknownoutput via Clang-nostdlib
Currently tested primarily on Windows with MinGW-w64 and Clang.
Code and examples: https://github.com/kanryu/hike-lang
Feedback on the compiler architecture or iterator design is very welcome!
18
u/Puzzled-Ad-3007 1d ago
While preparing for backend interviews, I found myself repeatedly looking up the same Go concurrency patterns (connection pools, batchers, pub/sub brokers, rate limiters, lazy init, pipelines, etc.). Instead of bookmarking dozens of articles, I put together a collection of small runnable examples in one repository.
I’d appreciate feedback:
• Which concurrency patterns are missing?
• Are there any examples that could be made more idiomatic?
GitHub: https://github.com/skp2001vn/go-concurrency-examples