From 49458f5ffd5a48c465117ec27f6437683f75acc1 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sat, 31 Jan 2026 20:38:50 +0300 Subject: initial --- content/posts/2022-05-31-golang-1.md | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 content/posts/2022-05-31-golang-1.md (limited to 'content/posts/2022-05-31-golang-1.md') diff --git a/content/posts/2022-05-31-golang-1.md b/content/posts/2022-05-31-golang-1.md new file mode 100644 index 0000000..75e1b64 --- /dev/null +++ b/content/posts/2022-05-31-golang-1.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 конфиги. \ No newline at end of file -- cgit v1.2.3