From bfdd73d7324a4f66a16f55d4fb064b0ff08d40e9 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Mon, 2 Feb 2026 00:35:54 +0300 Subject: =?UTF-8?q?=D0=91=D0=BE=D0=BB=D1=8C=D1=88=D0=B0=D1=8F=20=D1=87?= =?UTF-8?q?=D0=B8=D1=81=D1=82=D0=BA=D0=B0=20=D0=B1=D0=BB=D0=BE=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/posts/2022-05-31-golang-1/index.md | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 content/posts/2022-05-31-golang-1/index.md (limited to 'content/posts/2022-05-31-golang-1') diff --git a/content/posts/2022-05-31-golang-1/index.md b/content/posts/2022-05-31-golang-1/index.md new file mode 100644 index 0000000..51e511c --- /dev/null +++ b/content/posts/2022-05-31-golang-1/index.md @@ -0,0 +1,44 @@ +--- +categories: + - Без рубрики +date: "2022-05-31T01:00:00Z" +tags: + - go + - it +title: Golang подборка 1 +--- + +Просто собираю подборку интересных ссылок по гошке на почитать потом. + +- [Extra](https://github.com/neonxp/extra) — Моё. Пакет с разными полезными + функциями без дополнительных зависимостей. +- Серия видосов про создание игры в стиле Animal Crossing на golang с помощью + raylib — + https://www.youtube.com/watch?v=iWp-mCIQgMU&list=PLVotA8ycjnCsy30WQCwVU5RrZkt4lLgY5&index=1 +- Самописный распределенный типа Postgres + https://notes.eatonphil.com/distributed-postgres.html. Под капотом raft от + hashicorp, boltdb и самое интересное — парсинг SQL +- Рассчет расстояния между двумя Geo точками: + +```go +import "math" +... +// https://en.wikipedia.org/wiki/Haversine_formula +func GetDistance(lat1, lon1, lat2, lon2 float64) float64 { + lat1 *= math.Pi / 180 + lon1 *= math.Pi / 180 + lat2 *= math.Pi / 180 + lon2 *= math.Pi / 180 + return 12742 * math.Asin( + math.Sqrt( + math.Pow(math.Sin((lat2-lat1)/2), 2) + + math.Cos(lat1) * + math.Cos(lat2) * + math.Pow(math.Sin((lon2-lon1)/2), 2) + ) + ) +} +``` + +- [god](https://github.com/pioz/god) — Утилита подгатавливающая демоны из go + программы. Для меня ценное — что генерит systemd конфиги. -- cgit v1.2.3