Go Library
4.09K subscribers
16 photos
63 files
715 links
Go (Golang) Library

Реклама: @ostinostin
Контент: @mxssl
加入频道
Four-part tutorial series on test fuzzing in Go

Random testing in Go: https://bitfieldconsulting.com/golang/random-testing

Fuzz tests in Go: https://bitfieldconsulting.com/golang/fuzz-tests

Writing a Go fuzz target: https://bitfieldconsulting.com/golang/fuzz-target

Finding bugs with fuzzing: https://bitfieldconsulting.com/golang/bugs-fuzzing
goproxy

A minimalist Go module proxy handler.

Goproxy has fully implemented the GOPROXY protocol. Our goal is to find the most dead simple way to provide a minimalist handler that can act as a full-featured Go module proxy for those who want to build their own proxies.

https://github.com/goproxy/goproxy
Go Sync or Go Home: WaitGroup

Go’s goroutines, channels, and mutexes make it easy to develop complex concurrency systems. Most problems can be solved using these three mechanisms, but you might be asking yourself — what else is out there?

That’s what I was wondering when I stumbled upon the lesser-known features of the sync and x/sync packages. In this blog series, I will explore some of these niche features, focusing on practical use cases and how they can be used to boost performance and reduce latency.

https://medium.com/@yardenlaif/go-sync-or-go-home-waitgroup-5f074a03776e
ghw

ghw is a Go library providing hardware inspection and discovery for Linux and Windows. There currently exists partial support for MacOSX.

https://github.com/jaypipes/ghw
Coroutines for Go

This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines?

https://research.swtch.com/coro
Analyzing Go Build Times

Go is often praised for its fast build times. While they are pretty quick, they are slow enough that I spend a lot of time waiting for them, enough that it prompted me to go down the rabbit hole of thoroughly analyzing them. This post covers all aspects of what makes Go builds fast or slow.

https://blog.howardjohn.info/posts/go-build-times
Ten Years of “Go: The Good, the Bad, and the Meh”

Ten years ago, I wrote Go: The Good, the Bad, and the Meh. Way back in 2013, it made it to the front page of Hacker News and got over 400 comments on /r/programming. I don’t have analytics from back then, but I suspect it’s one of my more discussed pieces of writing, and it was definitely one of my first experiences of getting a lot of feedback for my writing. (Then again, I don’t have any evidence of whether John Carmack read it, so maybe it’s not the one for my obituary.)

Anyway, it’s been a decade, and in that time I’ve gone from playing around with Go as an amateur to being a professional programmer and using Go as one of my core languages. So, I thought it would be fun to look back at what I got right, what’s changed since I wrote it, what I missed, and what I got wrong. Feel free to read or re-read the original post, or just stick to my reflections here without digging back into it. Just know that as its title suggests, I wrote it with three sections for what I thought was “good”, “bad”, and “meh” about Go at that time.

https://blog.carlmjohnson.net/post/2023/ten-years-of-go-good-bad-meh
Event-Driven Architecture: What You Need to Know

What is an Event-Driven Architecture and Why do I need One?

https://encore.dev/blog/event-driven-architecture
pop

Send emails from your terminal.

https://github.com/charmbracelet/pop
oidc

Easy to use OpenID Connect client and server library written for Go and certified by the OpenID Foundation

https://github.com/zitadel/oidc
Preview: ranging over functions in Go

A major Go language change proposal was published earlier this week: add range over int, range over func, and there's a good chance this change will make it into a future Go release. In this post I will discuss the motivation for this proposal, how it's going to work, and provide some examples of how Go code using it would look.

Update 2023.07.24: the proposal keeps evolving, and some details will likely change. This post still serves as a good introduction to the topic, and I will update it (or add another post) when the proposal settles to the final syntax and semantics.

https://eli.thegreenplace.net/2023/preview-ranging-over-functions-in-go
Tutorial: Find and fix vulnerable dependencies with govulncheck

Govulncheck is a low-noise tool that helps you find and fix vulnerable dependencies in your Go projects. It does this by scanning your project’s dependencies for known vulnerabilities and then identifying any direct or indirect calls to those vulnerabilities in your code.

In this tutorial, you will learn how to use govulncheck to scan a simple program for vulnerabilities. You will also learn how to prioritize and evaluate vulnerabilities so that you can focus on fixing the most important ones first.

https://go.dev/doc/tutorial/govulncheck
The Go Memory Model

The Go memory model specifies the conditions under which reads of a variable in one goroutine can be guaranteed to observe values produced by writes to the same variable in a different goroutine.

https://go.dev/ref/mem
Common pitfalls in Go benchmarking

Go programmers have the good fortune of excellent testing and benchmarking tooling built into the standard library - in the testing package. However, benchmarking is hard. This isn't Go specific; it's just one of those things experienced developers learn over time.

This post lists some common benchmarking pitfalls Go programmers run into. It assumes basic familiarity with writing Go benchmarks; consult the testing package documentation if needed. While these pitfalls are presented in Go, they exist in any programming language or environment, so the lessons learned here are widely applicable.

https://eli.thegreenplace.net/2023/common-pitfalls-in-go-benchmarking
Use Cobra to Build Go-Powered CLIs

In this tutorial, I will show how you can use Cobra to build CLI applications in Go and highlight some of its key features and benefits. I will do this by walking you through the process of building a CLI that encrypts and decrypts text based on a specified cipher.

https://www.twilio.com/blog/use-cobra-build-go-powered-clis
Golang — это язык, который выбирают IT-инженеры и разработчики. Почему? Приведем пару фактов:

🔥 Это простой и востребованный язык: специалисты отдают предпочтение Go за легкость в работе и за то, что программы на нем исполняются с высокой скоростью.

🔥 Быстрый вход: у Go простой синтаксис и короткая документация. Для начала работы вам не потребуется серьезный технический бэкграунд.

🔥 Работодатели хотят сотрудников со знанием Go: этот язык входит в пятерку самых высокооплачиваемых по данным Хабр Карьера, а также в пятерку самых применяемых на GitHub.

Хотите освоить Golang, создавать с его помощью свои API-серверы? Запускать контейнеры и взаимодействовать с Docker из Go?

Тогда вам подойдёт курс «Golang для инженеров» от Слёрм Он стартует 11 сентября!

Курс будет проходить в формате потока: эксперты будут отвечать на вопросы студентов, проводить встречи с подробным разбором сложных заданий.

К концу обучения вы разработаете систему, которая будет собирать состояние других сервисов, сохранять собранное состояние в базу данных и предоставлять WEB API для доступа к сохраненным данным.

Посмотреть подробную программу можно по этой ссылке
Please open Telegram to view this post
VIEW IN TELEGRAM
From 26 Minutes to 20 Seconds: Using pprof to optimize large GraphQL Operations in Go

https://wundergraph.com/blog/optimizing_large_graphql_operations_with_golangs_pprof_tools
ff

ff stands for flags-first, and provides an opinionated way to populate a flag.FlagSet with configuration data from the environment. By default, it parses only from the command line, but you can enable parsing from environment variables (lower priority) and/or a configuration file (lowest priority).

Building a commandline application in the style of kubectl or docker? Consider package ffcli, a natural companion to, and extension of, package ff.

https://github.com/peterbourgon/ff