主页 | Web版 | 订阅 | 归档 | Feed

GopherDaily

20250513

每日一谚:Go pkgs are not hierarchical.


Go技术生态

从线下到线上,我的“Go语言进阶课”终于在极客时间与大家见面了!
我想向大家宣布一个酝酿已久的好消息:我的新专栏“TonyBai · Go 语言进阶课” 终于在极客时间正式上架了!

Go运行时底层接口标准化?“GOOS=none”欲为Go铺设通往裸金属、固件和微控制器的桥梁
一项备受关注的新提案 (#73608) 再次将目光投向了更底层的领域,建议引入 GOOS=none target。其核心并非简单添加一个操作系统类型,而是试图定义一套连接 Go 运行时与底层硬件/环境的接口,为 Go 语言铺设一条通往裸金属执行、安全固件开发乃至 Unikernel 和特定微控制器场景的桥梁。然而,这套接口能否以及如何实现“标准化”,并融入 Go 的兼容性承诺,成为了社区热议的焦点。

Go社区的“轻框架”理念:自由的馈赠还是无形的枷锁?
虽然 Go 官方从未明确宣称“轻框架或无框架”是其核心哲学,但从其设计选择——如强大的标准库、鼓励组合优于继承——以及社区早期的主流声音来看,Go 显著地倾向于“轻框架”,或者说“反大型、侵入式框架”

使用bufio Scanner和Reader高效读取输入数据

通过字节级数据优化改进你的 Go 应用程序
本文探讨了低级二进制数据优化如何改进你的程序。文章介绍了 Go 中的字节级数据操作,并通过一个酸面包发酵剂测量的例子,展示了如何通过自定义二进制格式代替 JSON 来显著减少数据大小和提高性能。文章比较了 JSON 和几种二进制数据表示方法的性能,并讨论了在数据结构优化时需要权衡的因素,例如可读性、可扩展性和维护性。最后,文章推荐了使用 Protobuf 作为一种在灵活性、可扩展性和性能之间取得平衡的方案。

Go语言 sync.WaitGroup:强大但易出错
学习如何正确使用 Go 语言的 sync.WaitGroup,文中包含实际示例、常见错误和性能技巧。避免死锁、泄漏并掌握 goroutine 管理。

云原生技术

Tailscale 4via6:大规模连接边缘部署
Tailscale 允许您安全地连接任何设备到任何设备。但实际部署通常会遇到网络问题:IP 地址重叠、双 NAT 和严格的防火墙。 本文重点介绍 4via6 子网路由——一种将 Tailscale 网状网络扩展到复杂边缘部署的强大方法。它非常适合传统 VPN 难以应对的场景,例如机器人集群、边缘设备或众多 VPC。

Dolt 入门:工作集和暂存区
Dolt 的版本控制功能借鉴了 Git,包括工作集和暂存区。对于从其他 SQL 数据库转向 Dolt 的新手来说,这些 Git 特定的概念可能比较棘手。本文将通过示例解释这些概念。

Kubernetes v1.33: Image Pull Policy the way you always thought it worked!

多路复用

模块目录和洞察:软件工厂的可重复使用构建块

odin: 一门适合我的编程语言

写作风格

AI

我如何以无障碍专家身份使用人工智能的四种方法
Shopify 的无障碍专家 Scott Vinkle 分享了他如何使用 AI 来提高工作效率,包括简化问题报告、增强测试、衡量合规性以及加快为 Shopify 商家修复问题的速度。他强调 AI 是一种强大的工具,可以增强人类专家的能力,而不是取代他们。

流行工具与项目

aquasecurity/trivy
Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more

livekit/livekit
End-to-end stack for WebRTC. SFU media server and SDKs.

pingcap/tidb
TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.

kubernetes/dashboard
General-purpose web UI for Kubernetes clusters

open-telemetry/opentelemetry-collector
OpenTelemetry Collector

usual2970/certimate
开源的SSL证书管理工具,可以帮助你自动申请、部署SSL证书,并在证书即将过期时自动续期。An open-source SSL certificate management tool that helps you automatically apply for and deploy SSL certificates, as well as automatically renew them when they are about to expire.

goharbor/harbor
An open source trusted cloud native registry project that stores, signs, and scans content.

uber-go/mock
GoMock is a mocking framework for the Go programming language.

opentofu/opentofu
OpenTofu lets you declaratively manage your cloud infrastructure.

googleapis/google-cloud-go
Google Cloud Client Libraries for Go.

iawia002/lux
👾 Fast and simple video download library and CLI tool written in Go

jackc/pgx
PostgreSQL driver and toolkit for Go

golang-jwt/jwt
Go implementation of JSON Web Tokens (JWT).

go-git/go-git
A highly extensible Git implementation in pure Go.

go-playground/validator
💯Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving

open-telemetry/opentelemetry-collector-contrib
Contrib repository for the OpenTelemetry Collector

labstack/echo
High performance, minimalist Go web framework

dexidp/dex
OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors

ehang-io/nps
一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.

hashicorp/vault
A tool for secrets management, encryption as a service, and privileged access management

samber/lo
💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

spf13/viper
Go configuration with fangs

qax-os/excelize
Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets


编辑:Tony Bai

编辑主页:tonybai.com

GopherDaily项目:github.com/bigwhite/gopherdaily

Copyright 2019-2024 GopherDaily