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

Реклама: @ostinostin
Контент: @mxssl
Download Telegram
Go, Containers, and the Linux Scheduler

Like many Go developers my applications are usually deployed in containers. When running in container orchestrators it’s important to set CPU limits to ensure that the container doesn’t consume all the CPU on the host. However, the Go runtime is not aware of the CPU limits set on the container and will happily use all the CPU available. This has bitten me in the past, leading to high latency, in this blog I’ll explain what is going on and how to fix it.


https://www.riverphillips.dev/blog/go-cfs
SORTING STRINGS IN GO, FAST & SLOW

https://aead.dev/news/sort-strings
doltgresql

From the creators of Dolt, the world's first version controlled SQL database, DoltgreSQL (aka Doltgres) is a Postgres-flavored version of Dolt. Doltgres offers all the Git-style log, diff, branch, and merge functionality of Dolt on your Postgres database schema and data. Instead of connecting with a MySQL client and using MySQL SQL, you connect to Doltgres with a Postgres client and use Postgres SQL. Doltgres is like Git and Postgres had a baby.


https://github.com/dolthub/doltgresql
goleak

Goroutine leak detector to help avoid Goroutine leaks.


https://github.com/uber-go/goleak
goverter

goverter is a tool for creating type-safe converters. All you have to do is create an interface and execute goverter. The project is meant as alternative to jinzhu/copier that doesn't use reflection.


https://github.com/jmattheis/goverter
gatewayd

GatewayD is a free and open-source cloud-native database gateway and framework for building data-driven applications. It sits between your database servers and clients and proxies all their communication. It is like API gateways, for databases.


https://github.com/gatewayd-io/gatewayd
nutsdb

NutsDB is a simple, fast, embeddable and persistent key/value store written in pure Go.

It supports fully serializable transactions and many data structures such as list、set、sorted set. All operations happen inside a Tx. Tx represents a transaction, which can be read-only or read-write. Read-only transactions can read values for a given bucket and a given key or iterate over a set of key-value pairs. Read-write transactions can read, update and delete keys from the DB.


https://github.com/nutsdb/nutsdb
fuse

bazil.org/fuse is a Go library for writing FUSE userspace filesystems.

It is a from-scratch implementation of the kernel-userspace communication protocol, and does not use the C library from the project called FUSE. bazil.org/fuse embraces Go fully for safety and ease of programming.


https://github.com/bazil/fuse
Go's 1.22+ ServeMux vs Chi Router

Go 1.22 introduces a couple new features for Go. Among them are changes to the net/http package that make it easier to use the ServeMux. In a nutshell, the routing for this type is being updated to allow for HTTP methods and URL path values.


https://www.calhoun.io/go-servemux-vs-chi
Pushing SQLite to its limits with Go while having fun

https://www.terlici.com/2023/11/06/pushing-sqlite-limits.html
cpuid

Package cpuid provides information about the CPU running the current program.

CPU features are detected on startup, and kept for fast access through the life of the application. Currently x86 / x64 (AMD64/i386) and ARM (ARM64) is supported, and no external C (cgo) code is used, which should make the library very easy to use.


https://github.com/klauspost/cpuid
miniredis

Pure Go Redis test server, used in Go unittests.


https://github.com/alicebob/miniredis
River: a Fast, Robust Job Queue for Go + Postgres

https://brandur.org/river
NilAway: Practical Nil Panic Detection for Go

Uber has widely adopted Go as a primary programming language for implementing backend services and libraries due to its high performance. The Go monorepo is the largest codebase at Uber, comprising 90 million lines of code (and growing). This makes tooling for writing reliable Go code a critical part of our development infrastructure.

Pointers (variables that hold the memory addresses of other variables instead of their actual values) are an integral part of the Go programming language and facilitate efficient memory management and effective data manipulation. Therefore, programmers use pointers extensively in writing Go programs for various purposes such as in-place data modification, concurrent programming, easy data sharing, optimizing memory usage, and facilitating interfaces and polymorphism. While pointers are powerful and widely used, it is essential to use them carefully and judiciously to avoid common pitfalls like nil pointer dereferences causing nil panics.


https://www.uber.com/en-NL/blog/nilaway-practical-nil-panic-detection-for-go
12 Personal Go Tricks That Transformed My Productivity

You may not have seen these techniques before, as I specifically developed them for my team’s use.


https://blog.devtrovert.com/p/12-personal-go-tricks-that-transformed
ergo

Ergo (formerly known as Oragono) is a modern IRC server written in Go.


https://github.com/ergochat/ergo
prest

pREST (PostgreSQL REST), is a simple production-ready API, that delivers a instant, realtime, and high-performance application on top of your existing or new Postgres database.


https://github.com/prest/prest
prisma-client-go

Prisma Client Go is an auto-generated query builder that enables type-safe database access and reduces boilerplate. You can use it as an alternative to traditional ORMs such as gorm, xorm, sqlboiler and most database-specific tools.


https://github.com/steebchen/prisma-client-go
orchestra

Orchestra is a library to manage long running go processes.


https://github.com/stephenafamo/orchestra