Skip to main content

Get the Reddit app

Scan this QR code to download the app now
Or check it out in the app stores
r/golang icon
r/golang icon

r/golang

members
online



Rill v0.2 - Concurrent MapReduce, Reduce, Better Docs and Examples Rill v0.2 - Concurrent MapReduce, Reduce, Better Docs and Examples
show & tell

Hello Gophers!

I'm excited to announce the release of Rill v0.2, a significant update to the Go library for simplified concurrency, streaming, batching, and pipeline creation.

https://github.com/destel/rill

First, I want to express my sincere gratitude for the incredible support you've shown for Rill. After the previous post, it gained 300 GitHub stars in just 2 weeks! That's far beyond my expectations, and I'm truly thankful for your interest and support.

So, what's new in Rill v0.2?

First and foremost, since one of the rill's main goals is to reduce boileplate and simplify developers' lives, this update introduces several new functions all aimed at providing more ways to consume and process streams:

  • Reduce and MapReduce: Concurrent implementations of the well-known operations, allowing you to easily reduce the entire stream to a single value or a Go map

  • All and Any: Concurrently check if all or at least one stream item satisfies a given condition, providing a convenient way to perform logical checks on stream elements

  • First and Err: Useful when you're interested in only the first value or error from a stream, complementing the existing ForEach function for processing stream results

In addition to these new functions, Rill v0.2 also brings:

  • Completely rewritten documentation with detailed explanations and examples for individual functions and the package as a whole, making it easier to understand and leverage Rill's capabilities.

  • Updated README and a new GitHub wiki containing useful information to get you started, along with advanced how-tos and examples for further exploration.

A lot of effort went into this update, and I'm excited to share these new features and improvements with the community. I would greatly appreciate your feedback, thoughts, and questions. Your input is valuable in shaping the future of Rill and making it the best it can be.


URL Shortener: URL Shortener made with GO (net/http) and PostgreSQL with JWT authentication URL Shortener: URL Shortener made with GO (net/http) and PostgreSQL with JWT authentication
show & tell

Hello! This is the first project I do in Go, as I had never used it (until about 5 days ago) and I thought it would be good as a first project a url shortener.

I would like to have feedback, since it is really a project that I have done focused on learning about Go and probably there are many things that can be improved, such as structure, code, etc ... so any quality improvement is welcome as long as it is constructive :)

This is the repository: https://github.com/Covicale/url-shortener-go


🌟 Take a Break with DoodleKit: Creative Coding for Fun! 🌟 🌟 Take a Break with DoodleKit: Creative Coding for Fun! 🌟
show & tell

Hey fellow Gophers!

Feeling tired from writing "serious code" all day? Need a fun and relaxing way to flex your coding muscles?

Introducing DoodleKit - an open-source library that lets you create stunning retro animations, inspired by the classic demoscenes from the C64, Amiga, and Spectrum days! 🎨✨

With DoodleKit, you can dive into creative coding, make amazing animated doodles, and share your creations with the community. It's a perfect way to unwind and let your creativity flow.

🔗 Check out DoodleKit on GitHub

🔗 Check out some existing doodle

Join the fun and share your doodles with #doodlekit. Let's see what you create!

Happy doodling!


Batcher: Type-safe, automatic, asynchronous batch processing Batcher: Type-safe, automatic, asynchronous batch processing
show & tell

Sharing a small. simple library that I thought could be useful to others. This was born out of some personal needs (optionally grouping and batch processing incoming PubSub messages being one example). Batcher provides a type-safe, easy way to batch together arbitrary groups of items to be automatically and asynchronously processed. The README contains more information and clear examples.

If you find it useful or have any feedback, please let me know.

Repo: https://github.com/mikestefanello/batcher



Clai - Multi vendor LLM cli with dev and devops centric tooling Clai - Multi vendor LLM cli with dev and devops centric tooling
show & tell

Hello! I'm back again with my tool clai, v1.4.0!

Since 1.3.0 I've added:
* clai cmd mode - cli command suggestions, like many other llm cli tools
* clai setup command - configures the many configuration files via `clai`, instead of relying on manually editing them
* Multi-os releases + release script
* Stability upgrades

For those who aren't acquainted (which would be most if it not all, tbh 🤔), clai is a tool I wrote to help my day to day work as a cloud engineer. So I use it to interpret large documents (cat document | clai -i q analyze this document: {}), auto-write code clai -g 'internal/handler.go' -r q write unittests for this file > internal/handler_test.goor give suggestions for design cat stacktrace | clai -t -t q find where this stacktrace originates from and a solution: {}<- this example uses tools which clai calls to analyze the local filesystem.



Adding insight to golang types without cluttering the logic. Adding insight to golang types without cluttering the logic.
show & tell

Hi.

I was working on a project that I wanted to ask your opinion on. The idea came from when I was trying to add Prometheus metrics to the dependencies of a system. However, I didn't want any of Prometheus' logic to get in the way of my logic. So I created a project called Misura that does exactly this. It wraps golang interfaces and enables to add Prometheus metrics or anything else actuall. I'd like to know if you guys find it useful or if I just wasted my time :).

Repo link
Thanks <3.


go-size-analyzer can parse //go:embed size now go-size-analyzer can parse //go:embed size now
show & tell

https://github.com/Zxilly/go-size-analyzer just introduce the support for golang embed analyzing since v1.3.0.

However, this feature relies heavily on inverting the specific internal memory layout of the go binary, I did as much as I could for compatibility and picked some popular projects for integration testing, but I'm still concerned that this could lead to unforeseen crashes.

I hope you'll give this project a try, and if this feature crashes on your project, please open an issue and let me know, it'll help me catch more corners cases, thanks a lot!




tunnel: a simple Linux TUN package with GSO/GRO support written in Go tunnel: a simple Linux TUN package with GSO/GRO support written in Go
show & tell

Tunnel is a golang tun package that supports generic segment/receive offloads (gso and gro) in linux.

  • supports gso and gro for both udp* and tcp

  • data gets reassembled when user does not provide hole ipv4 or ipv6 packet in one write method call

  • reduce number of read/write syscalls when gso/gro is enabled

https://github.com/Sina-Ghaderi/tunnel


Godocx - Go library for reading and writing Microsoft Docx Godocx - Go library for reading and writing Microsoft Docx
show & tell

First beta release of Godocx is out now. Basic functions has been implemented.

You can

  • Add paragraph, headings with different styles

  • Add picture

  • Add table with different styles

  • Add bullet/number list

  • You can open existing docx and modify or create docx from scratch

There are more functions and elements has yet to be implemented.

Github Repository





Yes, another To do app, but... Yes, another To do app, but...
show & tell

I rely on to-do apps or jotting down the 2 or 3 key tasks I need to tackle during a work session. However, I often find trying to use all features from these apps, which can be overwhelming, or using them for all sorts of things and they end up cluttered. And I forget that notebooks exist.

What I needed was something fast and accessible—something I could pop up, jot down a few tasks, and have it available like a sticky note. I didn’t conduct an exhaustive search, but I ended up making a 'solution' for myself. I've been using it consistently, and maybe it will be helpful for others too.

Check out the README! It includes download and installation information, with binaries available for Windows, Mac, and Linux in the releases section.

Any comments or contributions are welcome ;)

Made with BubbleTea

Edit:

I should have used this to plan the post so I would not forget the link xd, anyway here is it. Also, a warning note, this was a 1-day thingy so expect a BARE MINIMUM "style". Which is a pro for me anyways.

https://github.com/pg-goose/togo






asyncmachine-go v0.5.0 released - a lightweight Temporal alternative and general purpose state machine asyncmachine-go v0.5.0 released - a lightweight Temporal alternative and general purpose state machine
show & tell

This is the second release of asyncmachine-go, a lightweight Temporal alternative and general purpose state machine. It delivers lots of improvements, new examples, and most importantly a handful of case studies:

The benchmark is especially interesting, eg the chart with execution time of the original libp2p-pubsub compared to the state-based version (measured using go1.22 traces).

A good place to start is the cookbook and examples (like FSM or a file watcher).

Changelog for v0.5.0:

  • feat: add tools/cmd/am-gen #63

  • feat(am-dbg): add --select-connected and --clean-on-connect #62

  • feat(am-dbg): add search as you type (clients, tree) #61

  • feat(am-dbg): add matrix view #60

  • feat(am-dbg): optimize UI processing #59

  • feat(am-dbg): add tree relations UI #58

  • feat(am-dbg): add import/export #57

  • feat(am-dbg): add multi client support #56

  • feat(machine): add empty roadmap methods #55

  • feat(machine): add Eval #54

  • refac(pkg/machine): rename many identifiers, shorten #53

  • feat(machine): drop all dependencies (lo, uuid) #52

  • feat(machine): alloc handler goroutine on demand #51

  • feat(machine): add Transition.ClocksAfter #50

  • feat(machine): add HasStateChangedSince #49

  • feat: add pkg/x/helpers #48

  • feat: add pkg/telemetry/prometheus #46

  • feat: add pkg/history #45

  • fix(machine): add funcs SMerge, NormalizeID, IsActiveTick, CloneStates #44

  • fix(machine): fix thread safety #43

  • feat(machine): add Tracer API and Opts.Tracers #42

  • feat(machine): add SetStruct, EventStructChange #41

  • feat(machine): add getters (ActiveStates, Queue, Struct) #40

  • feat(machine): add single-state shorthands (Add1, Has1, etc) #39

  • feat(machine): add Switch(states...) #38

  • feat(machine): add Opts.Parent #37

  • feat(machine): add Opts.LogArgs, NewArgsMapper #36

  • feat(machine): add Opts.QueueLimit #35

  • feat(machine): add WhenDisposed, RegisterDisposalHandler #34

  • feat(machine): add WhenArgs #33

  • feat(machine): add WhenTime, WhenTicks #32

I hope you'll like it! (just kidding its reddit, but check the matrix video)


Log Viewer in GO Log Viewer in GO
show & tell

I wrote a dependency free log viewer in GO kevincobain2000/gol (github.com)

I wrote this in Go, because I wanted a simple, yet fast log viewer which doesn't need heavy middleware such as Elastic Search, or a separate DB which require many steps to setup.

The log viewer reads logs directly from the disk, and can perform search using regular expressions etc, with realtime update capabilities.

Results are displayed in paginated form, and auto judges the log level as info, warn, success etc.

Since it is written in GO, I embedded the frontend inside the binary, so it can just be downloaded and ready to use using simple command gol in the directly to match all log files, including ones that are tar.gz

Inspired by Log Viewer - Fast and beautiful log viewer for Laravel (opcodes.io)