home.social

#golang — Public Fediverse posts

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

  1. 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.

  2. Валидатор не нашёл поле 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 #микросервисы #валидация_данных #сериализация #безопасность_приложений #разработка_ПО

  3. 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

  4. 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?

  5. 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?

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

  7. 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

  8. 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

  9. 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

  10. 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

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

    codeberg.org/vyskocilm/herrors

    #golang

  12. Let's try this with some extra tags.

    Where do y'all go looking for #freelance or #contract #softwareengineering roles?

    My network isn't great for that sort of task, and things like #upwork and #fiverr really look like a race to the bottom.

    I primarily do #backend development.
    Would love to keep writing #golang but I have worked in other languages to. I'm also decent at #Dart / #Flutter

    #AskFedi

  13. RE: mastodon.social/@rmathew/11712

    Interesting interview with @rsc on #softwareengineering and #golang. Some tidbits:

    "In software engineering, the most fundamental truths don’t seem to change. The context around them does, but most of all it seems like we spend a lot of time remembering or rediscovering things we’d forgotten. Here are three:

    - Simplicity is the best strategy for #scaling
    - Software engineering is what happens to #programming when you add time and other people
    - #Tests are more for tomorrow than today"

  14. Are you multilingual?

    Sriracha, a free and open source (GNU LGPL) imageboard and forum server, supports changing the language of the management panel and individual boards.

    If you would like to help Sriracha support more locales, please visit the translation website. Translations are submitted online by individual string (word or phrase).

    translate.codeberg.org/project

    #translation #foss #opensource #language #multilingual #bilingual #translate #gnu #golang #imageboard #forums #server #free #libre

  15. Finally fixed a few issues with the `driveinfo` program. Checksums are now calculated and compared to the stored checksums in the JSON output. Also cleaned up the option parsing as well.

    Link: git.jamesthebard.net/jweatherl

    #mbr #gpt #programming #golang

  16. Wooo, `driveinfo` gets some nice JSON output. Took a bit of refactoring to get it looking right, but I'll take it.

    Releases: git.jamesthebard.net/jweatherl

    #mbr #gpt #golang

  17. Migrating 354GB from Google Photos to Proton was… an adventure.

    Key lesson: Proton Drive and Proton Photos are NOT the same API. Uploading to Drive doesn't put photos in your timeline. Two completely different systems.

    I built gphoto2proton (with 2 approaches):

    1️⃣ Go binary — streaming from .tgz, no disk extraction, cross-platform (macOS/Linux/Windows). Photos land in Drive. Albums via the undocumented Photos API.

    2️⃣ Bash script — wraps the proton-drive CLI (which has hidden photo/album commands not in the README). Photos go directly to the timeline. Linux only. Needs disk space for extraction.

    Why two? Because Proton's architecture forced it. Windows users have native app support. Everyone else gets to DIY.

    Open source, MIT, Homebrew, 126 tests:
    github.com/mmornati/gphoto2proton

    Read the full story on my blog:
    blog.mornati.net/how-i-built-g

    #Proton #GooglePhotos #OpenSource #Golang #Privacy #bmad #bmad-method

    PS like most of my current projects (I would to say all of them?), the idea was challenged and then built with BMAD (github.com/bmad-code-org/bmad-) if you haven't test it so far, give it a try !

  18. Как я делал текстовую игру для веба

    Привет, Хабр! Меня зовут Костя, я десять лет занимаюсь коммерческой Android-разработкой. Давно хотелось попробовать себя в вебе, а эксперименты с LLM давали некоторую уверенность в том, что по крайней мере есть шанс написать агентами поддерживаемый код и задеплоить. Что же можно сделать? Конечно тамагочи! Текстовая браузерная игра: герой живёт в мире мрачного будущего. Непрямое управление, возможность предлагать миссии, а также тюнинг предпочтений героя. Эдакий Годвилль, но на новый лад. Как я делал, и что получилось, спустя пару недель, расскажу под катом :)

    habr.com/ru/articles/1065090/

    #petproject #индиразработка #llm #claude_code #aiагенты #golang #текстовые_игры #idle_games

  19. Another revision or two of the `driveinfo` command done and I think I have almost all of the information. Spent some time getting EBR and logical partitions showing everything it needed to as well as being able to follow the logical partition chain using either CHS or LBA.

    ```
    [part 05] PartitionType: 0x83
    PartitionTypeDesc: Linux
    Primary/Logical: logical
    BootIndicatorFlag: 0x00
    CurrentPartition:
    FirstAbsoluteSectorLBA: 2048 (413696)
    SectorsInPartition: 204800
    AddressFirstAbsoluteCHS: [25 191 39]
    AddressLastAbsoluteCHS: [38 127 25]
    PartitionSize: 104857600
    NextPartition:
    FirstAbsoluteSectorLBA: 206848 (618496)
    SectorsInPartition: 206848
    AddressFirstAbsoluteCHS: [38 127 26]
    AddressLastAbsoluteCHS: [51 95 44]
    PartitionSize: 105906176
    ```

    Link: git.jamesthebard.net/jweatherl

    #gpt #mbr #ebr #golang #programming

  20. Finally got all of the GPT and MBR code put together, most of the bugs fixed, and released it as a downloadable Linux binary. Does a pretty good job of reading the data and giving out way too much information regarding the MBR and/or GUID partition table.

    Available here: git.jamesthebard.net/jweatherl

    #programming #gpt #mbr #golang #linux

  21. 🤔 Oh, joy. Another riveting #exposé on #Golang #maps, as if everyone was dying to know how the #Swiss took over the #bucket #brigade. 🚀 Apparently, this groundbreaking revelation is set to revolutionize our #code, assuming we cared about the "glue code" we never noticed in the first place. 😂
    blog.gaborkoos.com/posts/2026- #revolution #HackerNews #ngated