home.social

#golang — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #golang, aggregated by home.social.

  1. Падающая сборка, и это я её просил

    Три способа тихо сломать приложение сборкой зависимостей: два пула к базе, не тот кэш, разъехавшиеся ветки конфигурации. Компилятор их не ловит — типы верные. Рантайм-контейнеры ловят половину и приносят свои отказы. Про diogen — compile-time DI для Go: внедрение зависимостей на этапе компиляции, обычный Go-код на выходе, без рантайм-контейнера и без рефлексии.

    habr.com/ru/articles/1082060/

    #dependency_injection #внедрение_зависимостей #di #go #golang #кодогенерация #wire #fx #diogen #gorib

  2. I've been neck deep in the PNG spec writing the metadata decoder/encoder for EXIF, XMP, IPTC, and native text. I do enjoy me some byte-level work.

  3. Валидатор не нашёл поле is_admin, а Go его нашёл: пять ошибок при работе с JSON

    Один и тот же JSON может привести систему к разным выводам. Валидатор пропустит поле, которое Go‑сервис спокойно прочитает, nil ‑слайс превратится в неожиданный для клиента null , а ошибка в имени параметра останется незамеченной до самого продакшена. Разбираем пять случаев, где поведение encoding/json в Go способно создать расхождение между компонентами системы, и смотрим, что меняет переход на encoding/json/v2 . Узнать детали

    habr.com/ru/companies/otus/art

    #Go #Golang #JSON #API #backend #микросервисы #валидация_данных #сериализация #безопасность_приложений #разработка_ПО

  4. NginXplorer: Because Spinning Up a 2GB Grafana Stack Just to Watch Nginx Logs is Madness

    It usually starts with an innocent thought on a Friday evening. You’re logged into a low-powered VPS or your homelab machine, and you notice your blog is feeling a bit sluggish. Or maybe you noticed a suspicious spike in inbound network bandwidth and you just want to know: Who is hammering my web server right now, what URLs are they hitting, and how badly is my upstream PHP-FPM or reverse proxy sweating? Naturally, you look at your options in 2026: The “Modern Cloud-Native” […]

    schulz.dk/2026/09/14/nginxplor

  5. Most guides I found on Go backend services cover the code inside the service, with little on the production problems around it: configuration, lifecycle, observability, packaging, deployment.
    My new guide, Building a Production REST API in Go, covers all of these alongside a working example service: tecnick.com/guides/go-rest-api/
    #golang #restapi #backend #softwareengineering

  6. Hey #golang folks, I have a service listening on some port (say 4321) and the #systemd service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  7. Hey folks, I have a service listening on some port (say 4321) and the service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  8. Hey #golang folks, I have a service listening on some port (say 4321) and the #systemd service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  9. Hey #golang folks, I have a service listening on some port (say 4321) and the #systemd service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  10. Hey #golang folks, I have a service listening on some port (say 4321) and the #systemd service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  11. Trying to understand #golang. It seems to have quite some "implicit (and short) is better than explicit (and longer)"-features 🙄

  12. WGX is now ihasvpn, and it's been rewritten from scratch.

    The old WGX was a Bash installer that assembled a VPN on your host. The new one is a WireGuard server of its own: one static Go binary in one container, driving kernel WireGuard over netlink, with a web console built in.

    Free software, AGPL-3.0.

    jcoffey.dev/articles/wgx-is-no

    #WireGuard #SelfHosted #Golang #OpenSource #VPN

  13. WGX is now ihasvpn, and it's been rewritten from scratch.

    The old WGX was a Bash installer that assembled a VPN on your host. The new one is a WireGuard server of its own: one static Go binary in one container, driving kernel WireGuard over netlink, with a web console built in.

    Free software, AGPL-3.0.

    jcoffey.dev/articles/wgx-is-no

    #WireGuard #SelfHosted #Golang #OpenSource #VPN

  14. WGX is now ihasvpn, and it's been rewritten from scratch.

    The old WGX was a Bash installer that assembled a VPN on your host. The new one is a WireGuard server of its own: one static Go binary in one container, driving kernel WireGuard over netlink, with a web console built in.

    Free software, AGPL-3.0.

    jcoffey.dev/articles/wgx-is-no

    #WireGuard #SelfHosted #Golang #OpenSource #VPN

  15. I'm sure many older programmers will grunt at seeing this mentioned, but as much as AI annoys me just as much as the next guy (because of AI slop, increased hardware costs and stuff like that)...

    ... I can't deny that it feels like it's easier than ever to start learning to program these days.

    You've got yourself a personal tutor who guides you through step by step and answers all of your questions you might be wondering.

    You'll never be completely stuck.

    Learning #Golang with Gemini atm

  16. After reading about Hyrum-proofing in encoding/json/v2 I made a tiny errors compatible module doing exactly that.

    codeberg.org/vyskocilm/herrors

    #golang

  17. @drmorrisj So the company has full bought into the #Claude space. I have instruction sets for #python and #golang (my two languages) - both of which are 200,000 words long or longer, but I just can't bring myself to use it to agenically affect my code. I write faster than it does, even if I have to #debug

  18. 🚀 Oh, look! Another groundbreaking tutorial on how to reinvent #the #wheel in #Golang, because existing durable execution #solutions just weren't #convoluted enough. 🤦‍♂️ Dive into the #DBOS universe where #buzzwords reign supreme and practical usability takes a backseat to verbose documentation. 📚✨
    dbos.dev/blog/how-we-built-gol #Tutorials #Reinventing #HackerNews #ngated

  19. Release: fsm-toolkit v0.9.5

    fsm-toolkit is a Go toolkit for designing and analysing finite state machines. It provides a CLI tool (fsm) and a full TUI editor (fsmedit) supporting DFA, NFA, Mealy, and Moore machines — with multi-machine bundles, cross-machine linking, and a component system backed by reusable class libraries.

    Repo:

    github.com/ha1tch/fsm-toolkit#

    This is the biggest release since the project's inception bringing a component-oriented workflow to FSM design. You can now drag 74xx-series digital logic parts from a library drawer, assign typed properties to states, link machines into bundles, and manage it all from the TUI. Builds and releases for 12 platforms are now fully automated.

    New: Editor Manual

    github.com/ha1tch/fsm-toolkit/

    New: Workflow Guide

    github.com/ha1tch/fsm-toolkit/

    Highlights

    % Multi-document bundles with import and cross-machine navigation
    % Class and property system with 7 typed fields
    % Component drawer with drag-and-drop instantiation
    % 74xx-series class libraries (49 components across 7 families)
    % Machine manager with rename/delete and link propagation
    % Settings screen with vocabulary customisation and library loading
    % Improved TUI layout engine with cell-grid metrics
    % CI/CD pipeline targeting 12 platforms (Linux, macOS, Windows, FreeBSD, OpenBSD, NetBSD)
    % Separate CLI and editor manuals
    % 261+ tests passing

    Changelog:

    github.com/ha1tch/fsm-toolkit/

    #golang #foss #programming #compsci #fsm #digitallogic #tui #statemachines #electronics

  20. [Перевод] Планировщик Go

    Эта статья посвящена языку программирования Go 1.24 , работающему на Linux на архитектуре ARM . Она может не охватывать специфические для других операционных систем (ОС) или аппаратных архитектур детали. В этой статье подробно рассматриваются следующие вопросы: Компиляция и среда выполнения Go Примитивный планировщик Улучшение планировщика Модель GMP Начальная загрузка программы Создание горутины Цикл планирования Поиск готовой к выполнения горутины Вытеснение горутин Обработка системных вызовов Сетевой и файловый ввод-вывод Работа netpoll Сборщик мусора Общие функции API среды выполнения Go

    habr.com/ru/companies/timeweb/

    #go #golang #scheduler #scheduling #schedule_loop #планировщик #планирование #цикл_планирования #timeweb_статьи_перевод #goroutine

  21. ual 0.7.4 preliminar benchmarks

    Some early ual 0.7.4 benchmarking results across three backends: compiled with Go runtime, compiled with Rust runtime (rual), interpreted (iual).

    No attempt has been made to make the new backends faster yet (iual, rual). That being said most concurrent code performs similarly across all three backends, and only interpreted ual (tree walker) sees an obvious penalty in compute heavy algorithms. I might --maaaybee-- be able to provide a VM for iual, but given the performance of the binaries using the Go and Rust backends it seems that it would be a better use of my time to keep adding important features that are still missing in this version. (file handling, sockets, for starters).

    It seems to me that the ideal ual developer of the future will be happy to use iual for testing, and deliverable products will be compiled with one of the binary backend targets. The choice of Go or Rust will probably go down to environmental reasons, cultural aspects, or policy preference within organisations.

    All in all, a highly productive day!

    Now thinking of a fourth backend... wouldn't you guess what is it? 🙂

    #ual #foss #golang #rust #rustlang #compsci #programmming

  22. SteosMorphy: опенсорс замена давно умершему PyMorphy2

    PyMorphy2 - самая популярная библиотека для обработки слов в русском языке. Однако последний коммит в репозиторий этой библиотеки был сделан более 5 лет назад, а её установка на Python версии 3.11+ вызывает трудности, что делает использование данной библиотеки в нынешнее время максимально затруднительным. Предлагаю рассмотреть новую Open Source библиотеку SteosMorphy , которая является аналогом PyMorphy, но делает всё быстрее и круче! Ознакомиться

    habr.com/ru/articles/949604/

    #pymorphy #steosmorphy #обработка_языка #nlp #nlp_обработка_текста #pymorphy2 #обработка_слов #морфология #python #golang