Searching We.Love.Privacy.Club

Twts matching #Golang
Sort by: Newest, Oldest, Most Relevant

Security updates for Wednesday
Security updates have been issued by AlmaLinux (poppler), Debian (dnsmasq, mistral, okular, openssl, poppler, and strongswan), Fedora (exim, firefox, pcs, putty, and xorg-x11-server), Mageia (freeciv, golang-x-net, jq, libssh, libxmp, libxpm, minetest, ruby-net-ssh, tor, and wireshark), SUSE (389-ds, ack, agama-web-ui, amazon-ssm-agent, avahi, dpkg, elemental-register, elemental-system-agent, elemental-toolkit, ggml-devel-9500, go1.25, go1.26, kernel, kubernetes1.23, kubernetes1.24, … ⌘ Read more

⤋ Read More

Security updates for Monday
Security updates have been issued by AlmaLinux (bind, bind9.16, frr, kernel, kernel-rt, libexif, mysql, php, and unbound), Debian (apache2, chromium, glibc, gsasl, jackson-core, libxml2, nginx, request-tracker4, request-tracker5, tomcat10, tomcat11, and tomcat9), Fedora (chromium, firefox, haveged, keylime, libinput, libssh2, nasm, perl-CryptX, rust, thunderbird, and webkitgtk), Mageia (cockpit, golang-x-crypto, golang-x-sys-devel, kernel, kmod-virtualbox, kmod-xtables-addons, kernel-linus, … ⌘ Read more

⤋ Read More

Security updates for Wednesday
Security updates have been issued by AlmaLinux (bind, buildah, compat-libtiff3, compat-openssl11, containernetworking-plugins, crun, delve, dnsmasq, dovecot, edk2, firefox, freeipmi, gdk-pixbuf2, giflib, git-lfs, glib2, go-fdo-client, go-fdo-server, golang, grafana, grafana-pcp, gstreamer1-plugins-bad-free, gstreamer1-plugins-base, gstreamer1-plugins-good, and gstreamer1-plugins-ugly-free, iputils, jq, kernel, krb5, libcap, LibRaw, libsndfile, libsoup, libsoup3, libssh, libtiff, libvirt, linux-sgx, … ⌘ Read more

⤋ Read More

Security updates for Tuesday
Security updates have been issued by Debian (postorius and spip), Fedora (bind, bind-dyndb-ldap, linux-firmware, tor, and unbound), Mageia (ffmpeg, nginx, perl-Imager, and tigervnc, x11-server, x11-server-xwayland), Oracle (firefox and kernel), Red Hat (buildah, git-lfs, go-toolset:rhel8, golang, golang-github-openprinting-ipp-usb, grafana, grafana-pcp, gvisor-tap-vsock, java-1.8.0-openjdk, java-17-openjdk, java-21-openjdk, opentelemetry-collector, osbuild-composer, podman, rhc, rhc-wo … ⌘ Read more

⤋ Read More

Security updates for Wednesday
Security updates have been issued by AlmaLinux (corosync, dovecot, image-builder, python-tornado, resource-agents, and systemd), Debian (openjdk-11, openjdk-17, and pyjwt), Fedora (pdns, pyOpenSSL, and squid), Slackware (hunspell), SUSE (alloy, avahi, bubblewrap, cmctl, coredns, curl, dpkg, firefox, golang-github-prometheus-prometheus, grafana, libpng12, PackageKit, sed, and xen), and Ubuntu (docker.io-app, nghttp2, python-django, and python-mako). ⌘ Read more

⤋ Read More

Security updates for Wednesday
Security updates have been issued by AlmaLinux (capstone, cockpit, firefox, git-lfs, golang-github-openprinting-ipp-usb, kea, kernel, nghttp2, nodejs24, openexr, perl-XML-Parser, rsync, squid, and vim), Debian (imagemagick, systemd, and thunderbird), Slackware (libexif and xorg), SUSE (bind, clamav, firefox, freerdp2, giflib, go1.25, go1.26, helm, ignition, libpng16, libssh, oci-cli, rust1.92, strongswan, sudo, xorg-x11-server, and xwayland), and Ubuntu (rust-tar and rustc, rustc-1.7 … ⌘ Read more

⤋ Read More
In-reply-to » Why Go is Going Nowhere Go, the ancient board game that China, Japan and South Korea all claim as part of their cultural heritage, is struggling to expand its global footprint because the three nations that dominate it cannot agree on something as basic as a common rulebook.

@eldersnake@we.loveprivacy.club haha! I read as Golang the first time too. It is just the way our minds work. :-P

⤋ Read More
In-reply-to » Hmm, mine also resolves a leading tilde in these variables. And if $HOME is not specified it tries to resolve the user's home directory by user.Current().HomeDir. Maybe that's overkill, I have to check the XDG spec.

Ok, the standard library implementation is wonky at best, at least in regards to XDG, because it really doesn’t implement it properly. https://github.com/golang/go/issues/62382 I stick to my own code then. It doesn’t properly support anything else than Linux or Unixes that use XDG, but personally, I don’t care about them anyway. And the cross-platform situation is a giant mess. Unsurprisingly.

⤋ Read More

Simple, minimal SQL database migrations written in Go with generics. Std lib database/sql and SQLX supported OOTB
I built GoSMig for personal projects and open-sourced it. It’s a tiny library for writing migrations in Go (compile-time checks via generics). Supports both transactional and non-transactional steps, rollback, status/version commands, and a built-in CLI handler so you can ship your own tool.

  • Zero dependencies (std lib; golang.org/x/term used for pager support)
  • database/sql and sqlx supported out of the box, others w … ⌘ Read more

⤋ Read More

Golang 中的隊列實戰:從入門到精通,打造你的併發利器
在後端開發中,隊列(Queue) 是一種常見又強大的數據結構,它就像排隊買奶茶一樣,先進先出(FIFO)的原則幫助我們有序處理任務。在 Golang 這個以併發著稱的語言中,隊列更是扮演了關鍵角色。今天我們就用通俗易懂的方式,帶你徹底掌握 Golang 中的隊列實現方式,以及如何在實際項目中運用它! 一、什麼是隊列?爲什麼需要它?—————隊列是一種先入先出的數據結構。想象一下 ⌘ Read more

⤋ Read More

Golang 中的隊列實戰:從入門到精通,打造你的併發利器
在後端開發中,隊列(Queue) 是一種常見又強大的數據結構,它就像排隊買奶茶一樣,先進先出(FIFO)的原則幫助我們有序處理任務。在 Golang 這個以併發著稱的語言中,隊列更是扮演了關鍵角色。今天我們就用通俗易懂的方式,帶你徹底掌握 Golang 中的隊列實現方式,以及如何在實際項目中運用它! 一、什麼是隊列?爲什麼需要它?—————隊列是一種先入先出的數據結構。想象一下 ⌘ Read more

⤋ Read More

golang 每日一庫之磁盤鍵值存儲 diskv
diskv你有沒有想過,在某些時候,內存不是萬能的——比如你要存的東西多得像個大水庫,又或者你就想放心大膽地關掉程序然後下班回家。而這時你需要一個靠譜的、基於磁盤的鍵值存儲庫。所以你用 sqlite 嗎?筆者第一想法就是 sqlite.來,認識一下主角:diskv,一個簡單、強大、零依賴、沒有數據庫暴脾氣的 Go 鍵值存儲庫。它的核心理念很簡單:用磁盤做字典,鍵是路徑,值是文件內容。設計哲學— ⌘ Read more

⤋ Read More

golang 每日一庫之磁盤鍵值存儲 diskv
diskv你有沒有想過,在某些時候,內存不是萬能的——比如你要存的東西多得像個大水庫,又或者你就想放心大膽地關掉程序然後下班回家。而這時你需要一個靠譜的、基於磁盤的鍵值存儲庫。所以你用 sqlite 嗎?筆者第一想法就是 sqlite.來,認識一下主角:diskv,一個簡單、強大、零依賴、沒有數據庫暴脾氣的 Go 鍵值存儲庫。它的核心理念很簡單:用磁盤做字典,鍵是路徑,值是文件內容。設計哲學— ⌘ Read more

⤋ Read More

Golang 的多任務調度系統:從 BaseJob 到 ProductJob 的 “泛型” 與 “繼承” 實現
突破 Go 語言限制! 揭祕如何用組合 + 接口實現類繼承效果,打造高擴展任務調度系統。以 BaseJob 泛型基類和 ProductJob 實戰爲例,深度解析:配置泛型化設計 方法重寫技巧 運行時多態實現 讓您的 Go 應用輕鬆處理百萬級定時任務!💪🚀 基礎架構:BaseJob 的 “泛型” 實現————————-在 lib/basejob.g ⌘ Read more

⤋ Read More

Golang 的多任務調度系統:從 BaseJob 到 ProductJob 的 “泛型” 與 “繼承” 實現
突破 Go 語言限制! 揭祕如何用組合 + 接口實現類繼承效果,打造高擴展任務調度系統。以 BaseJob 泛型基類和 ProductJob 實戰爲例,深度解析:配置泛型化設計 方法重寫技巧 運行時多態實現 讓您的 Go 應用輕鬆處理百萬級定時任務!💪🚀 基礎架構:BaseJob 的 “泛型” 實現————————-在 lib/basejob.g ⌘ Read more

⤋ Read More

Golang 異步日誌實戰:通道 - 中間件的完美組合
本文深入探討在 Golang Web 開發中如何利用通道和中間件實現高效異步日誌系統。通過 GRPC 和 Gin 中間件實現,結合項目實例代碼,展示如何在不阻塞主流程的情況下完成日誌記錄,大幅提升系統性能。一、異步日誌的核心思想在 Web 應用中,日誌記錄是必不可少的功能,但同步日誌會阻塞請求處理流程。異步日誌通過通道 (channel) 實現生產者 - 消費者模式:生產者 :中間件 ⌘ Read more

⤋ Read More

Golang 異步日誌實戰:通道 - 中間件的完美組合
本文深入探討在 Golang Web 開發中如何利用通道和中間件實現高效異步日誌系統。通過 GRPC 和 Gin 中間件實現,結合項目實例代碼,展示如何在不阻塞主流程的情況下完成日誌記錄,大幅提升系統性能。一、異步日誌的核心思想在 Web 應用中,日誌記錄是必不可少的功能,但同步日誌會阻塞請求處理流程。異步日誌通過通道 (channel) 實現生產者 - 消費者模式:生產者 :中間件 ⌘ Read more

⤋ Read More

golang 反射 new?
今天來聊一個在 Golang 裏新手容易踩坑但高級用法又很關鍵的點:反射 + reflect.New。看上去很底層,實際在做框架開發、泛型模擬、動態構造對象的時候,全靠它撐場子!我前段時間折騰一個插件系統(Go 寫的),要從字符串配置動態構造 struct 對象實例,就必須用 reflect.New。這塊調試了好一陣,今天把經驗和注意事項總結一下,走一波實戰向的乾貨分享。1)reflect.New ⌘ Read more

⤋ Read More

golang 每日一庫之 rqlite
rqlite 是一個基於 SQLite 的輕量級、分佈式關係數據庫,旨在提供高可用性和容錯能力。它是一個 將 SQLite 封裝爲分佈式系統的項目,用 Go 編寫,後端使用 Raft 共識算法實現多節點數據複製與一致性。地址–GitHub: https://github.com/rqlite/rqlite文檔: https://rqlite.io目標–SQLite 是一個嵌入式的、本地文件型數 ⌘ Read more

⤋ Read More

golang 每日一庫之參數校驗工具 go-tagexpr
go-tagexpr 是字節跳動開源的一款輕量級 Go 標籤解析與表達式求值引擎。我一般用來校驗參數。它的主要功能是支持通過結構體標籤(struct tag)定義表達式,然後在運行時動態解析這些表達式,實現靈活的數據校驗、默認值設置等功能。核心特性VzBq9U示例type User struct {    Name string json:“name” tagexpr:“len(name) 0 ⌘ Read more

⤋ Read More

Golong 語言如何實現遞歸?
*說到遞歸函數這個東西,別看名字高大上,真要在 Golang(Go 語言)裏寫,其實一不小心就把自己繞暈了,我當年第一次寫遞歸找文件目錄的時候,腦殼都轉麻了。但話說回來,只要你把幾個關鍵點弄清楚,其實寫起來挺爽的,甚至有點 “優雅”!這篇就從我實戰經驗出發,帶你搞懂 “在 Golang 裏怎麼寫遞歸函數”,順帶踩幾個坑出來,保你一看就會、馬上能寫!啥是遞歸?簡單說下一句話:遞歸就是函數自己調自己! ⌘ Read more

⤋ Read More

golang 每日一庫之 goplantuml
goplantuml 是一個用 Go 編寫的工具,能夠 自動將 Go 語言項目的結構生成 PlantUML 類圖(Class Diagram),適合用於 代碼可視化、架構審查、文檔編寫、團隊溝通** 等場景。項目地址—-GitHub 地址:https://github.com/jfeliu007/goplantuml概述–goplantuml 解析你的 Go 源碼,識別其中的:結構體(st ⌘ Read more

⤋ Read More

golang 每日一庫之 picfit
thoas/picfit 是一個用 Go 語言編寫的圖片處理服務器,主要用於 動態圖像裁剪、縮放、格式轉換和緩存 等功能。它適合用於圖片 CDN、圖像代理服務或網站中的動態圖片展示,尤其適合現代化網站、媒體服務、電子商務平臺等場景。項目地址—-GitHub: https://github.com/thoas/picfit優點–支持多種操作 :裁剪(crop)、縮放(resize ⌘ Read more

⤋ Read More

Golang MVC 和 DDD 分層架構的詳細比較
MVC 和 DDD 是後端開發中兩種流行的分層架構概念。MVC(Model-View-Controller)是一種設計模式,主要用於分離用戶界面、業務邏輯和數據模型,以便更容易解耦和分層;而 DDD(Domain-Driven Design,領域驅動設計)是一種架構方法論,旨在通過構建業務領域模型來解決複雜系統中的設計和維護難題。在 Java 生態系統中,許多系統已經逐漸從 MVC 過渡到 DDD ⌘ Read more

⤋ Read More

go-rag: 突破 Python 壟斷的 Golang RAG 系統
💡 項目概述https://github.com/wangle201210/go-rag 是基於 Golang 實現的企業級知識庫檢索增強生成系統,打破 RAG 領域 Python 一家獨大的局面。集成多知識庫管理、智能文檔解析、QA 優化、查詢重寫、多路召回、重排序、MCP 協議等核心功能,爲 Golang 開發者提供開箱即用的 RAG 解決方案。🎯 解決的核心痛點痛點一:語言生態侷限現有開源 ⌘ Read more

⤋ Read More

golang 每日一庫之 urfave-negroni
urfave/negroni 是一個輕量級的、可擴展的 Go 中間件庫,專爲構建 HTTP 服務而設計。它的核心理念是中間件棧(Middleware Stack),可以像洋蔥一樣一層層包裹處理請求,非常適合構建具有清晰請求生命週期的 Web 應用或 API。GitHub 地址:https://github.com/urfave/negroni特點–中間件機制清晰簡潔 :支持多箇中間 ⌘ Read more

⤋ Read More

golang 每日一庫之 Zinx
Zinx 是一個用 Go 語言編寫的輕量級、併發 TCP 服務器框架,旨在幫助初學者深入理解 TCP 服務端開發的核心架構,同時具有生產級特性的模塊化設計 。倉庫地址https://github.com/aceld/zinx設計理念學習導向 :源碼精簡,框架和教程同步開發,分版本迭代,一步步構建功能,降低學習門檻 。 生產適用 :模塊化、擴展性強,已被用於遊戲服務 ⌘ Read more

⤋ Read More

golang 每日一庫之 Zinx
Zinx 是一個用 Go 語言編寫的輕量級、併發 TCP 服務器框架,旨在幫助初學者深入理解 TCP 服務端開發的核心架構,同時具有生產級特性的模塊化設計 。倉庫地址https://github.com/aceld/zinx設計理念學習導向 :源碼精簡,框架和教程同步開發,分版本迭代,一步步構建功能,降低學習門檻 。 生產適用 :模塊化、擴展性強,已被用於遊戲服務 ⌘ Read more

⤋ Read More

Golang 裏普通 map 不用鎖,咋解決協程安全?
在 Go 語言開發中,map 是常用的數據結構,但原生 map 在併發讀寫時會導致 panic。這是因爲 Go 的設計哲學是 “顯式優於隱式”,不自動處理併發安全問題,需要開發者根據場景選擇合適的併發控制策略。本文將深入探討三種主流解決方案,並分析它們的適用場景和性能特點。方案一:官方推薦的 sync.Map基本用法sync.Map是 Go 標準庫提供的線程安全 map 實現,適合讀多寫少的場景: ⌘ Read more

⤋ Read More

Golang 裏普通 map 不用鎖,咋解決協程安全?
在 Go 語言開發中,map 是常用的數據結構,但原生 map 在併發讀寫時會導致 panic。這是因爲 Go 的設計哲學是 “顯式優於隱式”,不自動處理併發安全問題,需要開發者根據場景選擇合適的併發控制策略。本文將深入探討三種主流解決方案,並分析它們的適用場景和性能特點。方案一:官方推薦的 sync.Map基本用法sync.Map是 Go 標準庫提供的線程安全 map 實現,適合讀多寫少的場景: ⌘ Read more

⤋ Read More

golang 每日一庫之 DDD 框架 freedo
Freedom:自由不是亂來,而是架構有道———————你是不是寫 Go 寫得挺開心的,直到有一天產品說: “這個業務流程以後會變、會拆、可能還會上天。”於是你開始發愁:怎麼寫纔不會三個月後改到哭? 怎麼解耦、怎麼擴展、怎麼不踩坑? 這時候,Freedom 躍馬而來,大喊一句: “用我!讓你寫得自由、改得瀟灑、跑得像風!”什麼是 Freedom—– ⌘ Read more

⤋ Read More

golang 每日一庫之 DDD 框架 freedo
Freedom:自由不是亂來,而是架構有道———————你是不是寫 Go 寫得挺開心的,直到有一天產品說: “這個業務流程以後會變、會拆、可能還會上天。”於是你開始發愁:怎麼寫纔不會三個月後改到哭? 怎麼解耦、怎麼擴展、怎麼不踩坑? 這時候,Freedom 躍馬而來,大喊一句: “用我!讓你寫得自由、改得瀟灑、跑得像風!”什麼是 Freedom—– ⌘ Read more

⤋ Read More

golang 每日一庫之 GoAdmin
你是不是曾經想用 Go 寫個後臺系統,結果一不小心就寫成了 Bug 系統?是不是寫到權限控制的時候,感覺自己變成了權限受害者?是不是本來想安安心心做個 CRUD 工人,結果被前端 UI 折磨到懷疑人生?別怕,GoAdmin 來拯救你了!什麼是 GoAdmin簡單說,GoAdmin 就是 Go 語言界的 “萬能後臺神器”。它能幫你:三分鐘起飛 :快速搭出一個後臺系統; 一行不寫也 ⌘ Read more

⤋ Read More

golang 每日一庫之 GoAdmin
你是不是曾經想用 Go 寫個後臺系統,結果一不小心就寫成了 Bug 系統?是不是寫到權限控制的時候,感覺自己變成了權限受害者?是不是本來想安安心心做個 CRUD 工人,結果被前端 UI 折磨到懷疑人生?別怕,GoAdmin 來拯救你了!什麼是 GoAdmin簡單說,GoAdmin 就是 Go 語言界的 “萬能後臺神器”。它能幫你:三分鐘起飛 :快速搭出一個後臺系統; 一行不寫也 ⌘ Read more

⤋ Read More

golang 每日一庫之工作流引擎 cadence
Cadence 是由 Uber 開發並開源的分佈式工作流編排引擎,旨在幫助開發者構建可擴展、可靠且具備容錯能力的分佈式應用程序。這個 Uber 當前給我發了好多打車券,還是很厚道的。特點–1. 容錯的有狀態工作流Cadence 的工作流是 “容錯的有狀態工作流”,即使在進程崩潰或服務重啓的情況下,工作流的狀態(包括局部變量、調用棧、定時器等)也能自動恢復,確保業務流程不中斷。2. 異步任務與自動 ⌘ Read more

⤋ Read More

golang 每日一庫之工作流引擎 cadence
Cadence 是由 Uber 開發並開源的分佈式工作流編排引擎,旨在幫助開發者構建可擴展、可靠且具備容錯能力的分佈式應用程序。這個 Uber 當前給我發了好多打車券,還是很厚道的。特點–1. 容錯的有狀態工作流Cadence 的工作流是 “容錯的有狀態工作流”,即使在進程崩潰或服務重啓的情況下,工作流的狀態(包括局部變量、調用棧、定時器等)也能自動恢復,確保業務流程不中斷。2. 異步任務與自動 ⌘ Read more

⤋ Read More

golang 每日一庫之工作流引擎 Temporal
Temporal 是一個開源的分佈式工作流編排系統,旨在簡化構建和運行可靠、可擴展的長時間運行的後端應用程序。它最初是由 Uber 的 Cadence 系統演變而來,現在由 Temporal Technologies 公司主導開發。目前已被 Coinbase、Netflix、Box、Snap 等大規模應用。核心功能—-1. 分佈式工作流編排Temporal 支持在多臺機器上協調執行復雜的業務邏 ⌘ Read more

⤋ Read More