Go Library
4.13K subscribers
20 photos
63 files
806 links
Go (Golang) Library

Реклама: @ostinostin
Контент: @mxssl
Download Telegram
steampipe

Steampipe is the zero-ETL solution for getting data directly from APIs and services. We offer these Steampipe engines:

- Steampipe CLI. Query APIs, check compliance, visualize on dashboards.
- Steampipe Postgres FDWs. Use native Postgres Foreign Data Wrappers that translate APIs to foreign tables.
- Steampipe SQLite extensions. Use SQLite extensions that translate APIS to SQLite virtual tables.
- Steampipe export tools. Use standalone binaries that export data from APIs, no database required.
- Turbot Pipes. Query, check, and visualize with your team using the only intelligence, automation & security platform built specifically for DevOps.


https://github.com/turbot/steampipe
Debugging Go compiler performance in a large codebase

As we’ve talked about before, our app is a monolith: all our backend code lives together and gets compiled into a single binary. One of the reasons I prefer monolithic architectures is that they make it much easier to focus on shipping features without having to spend much time thinking about where code should live and how to get all the data you need together quickly.

However, I’m not going to claim there aren’t disadvantages too. One of those is compile times. Because all the backend code needs to be built into a single artefact, the time it takes to do that inevitably increases as the amount of code to compile grows.

That’s bad for shipping quickly: a slower build means it takes longer to get code from “pull request merged” to “running for customers”. It’s also bad for developer experience: time spent waiting for the compiler isn’t productive time, and it can really break your flow.

While faster MacBooks can make a big difference, we can also apply some performance-optimising tools that come with Golang to figure out where the bottlenecks are and remove them!


https://incident.io/blog/go-build-faster
Omitting dev dependencies in Go binaries

As of now, unlike Python or NodeJS, Go doesn’t allow you to specify your development dependencies separately from those of the application. However, I like to specify the dev dependencies explicitly for better reproducibility.


https://rednafi.com/go/omit_dev_dependencies_in_binaries
Exploring Go 1.22: Effective HTTP Routing Strategies

It’s 2024 and Disney’s steam boat Willie has found itself in the public domain; however, the good news keeps rolling in with the addition of enhanced pattern matching for the STD library’s server MUX. Eerily similar to Apple, the Go team can be regarded as the final players in a vast array of frameworks — and they got it right. In this post, I’ll demonstrate how you can bind a http.Handler to a specific verb, and even host name.


https://www.talkativedev.com/go-blog/exploring-go-122-effective-http-routing-strategies
Finding unreachable functions with deadcode

https://go.dev/blog/deadcode
From slow to SIMD: A Go optimization story

So, there's this function. It's called a lot. More importantly, all those calls are on the critical path of a key user interaction. Let's talk about making it fast.


https://sourcegraph.com/blog/slow-to-simd
tint

Package tint implements a zero-dependency slog.Handler that writes tinted (colorized) logs. Its output format is inspired by the zerolog.ConsoleWriter and slog.TextHandler.


https://github.com/lmittmann/tint
ffmpeg-go

Go bindings for the FFmpeg AV libraries.


https://github.com/csnewman/ffmpeg-go
go-feature-flag

GO Feature Flag is a lightweight and open-source solution that provides a simple and complete feature flag implementation.


https://github.com/thomaspoignant/go-feature-flag
Go memory metrics demystified

For engineers in charge of supporting Go applications, diagnosing and resolving memory issues such as OOM kills or memory leaks can be a daunting task. Practical and easy-to-understand information about Go memory metrics is hard to come by, so it’s often challenging to reconcile your system metrics—such as process resident set size (RSS)—with the metrics provided by the old runtime.MemStats, with the newer runtime/metrics, or with profiling data.


https://www.datadoghq.com/blog/go-memory-metrics
goja

Goja is an implementation of ECMAScript 5.1 in pure Go with emphasis on standard compliance and performance.


https://github.com/dop251/goja
bluerpc

Golang library for end-to-end Go-Typescript type safety.


https://github.com/blue-rpc/bluerpc
Getting started with otelsql, the OpenTelemetry instrumentation for Go SQL

otelsql is an instrumentation library for the database/sql library of the Go programming language. It generates traces and metrics from the application when interacting with databases. By doing that, the library allows you to identify errors or slowdowns in your SQL queries that potentially impact the performance of your application.


https://opentelemetry.io/blog/2024/getting-started-with-otelsql
More powerful Go execution traces

https://go.dev/blog/execution-traces-2024
Testing out Profile-Guided Optimization on Dolt's SQL Benchmarks

https://www.dolthub.com/blog/2024-02-02-profile-guided-optimization
Profile Guided optimisation

Learn how PGO improves use of inlining and CPU instruction caches. I show how to get biggest boost for your projects by using the right CPU profile


https://andrewwphillips.github.io/blog/pgo.html
Context Control in Go

Best practices for handling context plumbing.


https://zenhorace.dev/blog/context-control-go
Type assertion vs type switches in Go

https://rednafi.com/go/type_assertion_vs_type_switches
integresql

IntegreSQL manages isolated PostgreSQL databases for your integration tests.


https://github.com/allaboutapps/integresql
How I write HTTP services in Go after 13 years

This post covers a range of topics related to building services in Go, including:

- Structuring servers and handlers for maximum maintainability
- Tips and tricks for optimizing for a quick startup and graceful shutdown
- How to handle common work that applies to many types of requests
- Going deep on properly testing your services
- From small projects to large, these practices have stood the test of time for me, and I hope they will for you too.


https://grafana.com/blog/2024/02/09/how-i-write-http-services-in-go-after-13-years