Go Library
4.09K subscribers
17 photos
63 files
713 links
Go (Golang) Library

Реклама: @ostinostin
Контент: @mxssl
加入频道
permify

Permify is an open-source authorization service for creating and maintaining fine-grained authorizations in your applications.

With Permify you can easily structure your authorization model, store authorization data in your own servers securely, and interact with Permify API to handle all authorization questions from any of your applications.

Permify's data model is inspired by Google’s consistent, global authorization system, Google Zanzibar Paper.

https://github.com/Permify/permify
hydra

Ory Hydra is a hardened, OpenID Certified OAuth 2.0 Server and OpenID Connect Provider optimized for low-latency, high throughput, and low resource consumption. Ory Hydra is not an identity provider (user sign up, user login, password reset flow), but connects to your existing identity provider through a login and consent app. Implementing the login and consent app in a different language is easy, and exemplary consent apps (Node) and SDKs for common languages are provided.

https://github.com/ory/hydra
progressbar

A very simple thread-safe progress bar which should work on every OS without problems. I needed a progressbar for croc and everything I tried had problems, so I made another one. In order to be OS agnostic I do not plan to support multi-line outputs.

https://github.com/schollz/progressbar
lux

Lux is a fast and simple video downloader built with Go.

https://github.com/iawia002/lux
50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs

Go is a simple and fun language, but, like any other language, it has a few gotchas... Many of those gotchas are not entirely Go's fault. Some of these mistakes are natural traps if you are coming from another language. Others are due to faulty assumptions and missing details.

A lot of these gotchas may seem obvious if you took the time to learn the language reading the official spec, wiki, mailing list discussions, many great posts and presentations by Rob Pike, and the source code. Not everybody starts the same way though and that's OK. If you are new to Go the information here will save you hours debugging your code.

https://devs.cloudimmunity.com/gotchas-and-common-mistakes-in-go-golang
golang-lru

This provides the lru package which implements a fixed-size thread safe LRU cache. It is based on the cache in Groupcache.

https://github.com/hashicorp/golang-lru
pie

A utility library for dealing with slices and maps that focuses on type safety and performance.

https://github.com/elliotchance/pie
tamarin

An embedded scripting language for Go projects

https://github.com/cloudcmds/tamarin
mockery

mockery provides the ability to easily generate mocks for Golang interfaces using the stretchr/testify/mock package. It removes the boilerplate coding required to use mocks.

https://github.com/vektra/mockery
gorse

Gorse is an open-source recommendation system written in Go. Gorse aims to be a universal open-source recommender system that can be quickly introduced into a wide variety of online services. By importing items, users, and interaction data into Gorse, the system will automatically train models to generate recommendations for each user.

https://github.com/gorse-io/gorse
chroma

A general purpose syntax highlighter in pure Go

https://github.com/alecthomas/chroma
SSH port forwarding with Go

This post shows how to set up SSH port forwarding ("tunnels") - both local and remote - using the extended Go standard library.

https://eli.thegreenplace.net/2022/ssh-port-forwarding-with-go
miller

Miller is like awk, sed, cut, join, and sort for data formats such as CSV, TSV, JSON, JSON Lines, and positionally-indexed.

https://github.com/johnkerl/miller
skeema

Skeema is a tool for managing MySQL and MariaDB schema changes in a declarative fashion using pure SQL.

https://github.com/skeema/skeema
semver

Work with Semantic Versions in Go

https://github.com/Masterminds/semver
Some Useful Patterns for Go's os/exec

We're building Dolt, the world's first SQL database with Git-like version control. Dolt has a large test suite, partly in golang unit tests and partly in bats, a framework for writing tests that run in Bash and can easily test many interactions with standalone programs.

Testing some of Dolt's features, like standby replication, requires spawning and coordinating multiple processes. Bats and Bash wasn't the right tool for the job. Luckily, Go has great facilities for spawning and interacting with background processes. While running processes from Go is not as concise as running them from the shell, it has robust facilities for error handling and concurrency.

https://www.dolthub.com/blog/2022-11-28-go-os-exec-patterns
d2

D2 is a modern diagram scripting language that turns text to diagrams.

https://github.com/terrastruct/d2
Effective Error Handling in Golang

In this article, I’ll demonstrate the basics of handling errors in Go, as well as some simple strategies you can follow in your code to ensure your program is robust and easy to debug.

https://earthly.dev/blog/golang-errors