Transitioning to Go
TRANSITIONING TO GO SEP 20 2023 Robert Pająk pellared @ GitHub SplunkHello whoami fundamentals going further more, more q&a 01 02 03 04 05whoamiROBERT PAJĄK Go maintainer Go language committee Tour of Go 2. Read and try: How to Write Go Code 3. Read and follow: Effective Go 4. Read and follow: CodeReviewComments 5. Check: Go by Examplehttps://go.dev/tourhttps://go.dev/doc/codehttps://go.dev com/golang/go/wiki/CodeReviewCommentshttps://gobyexample.comgoing furtherhttps://www.gopl.iohttps://go.dev/ref/memhttps://exercism.orghttps://quii.gitbook.io/learn-go-with-testshttps://go101.orghttps://go.dev/blogmore0 码力 | 30 页 | 1.53 MB | 4 月前31.2 Go in TiDB
Go in TiDB 申砾@PingCAP Agenda • About Me • What is TiDB • TiDB Architecture • SQL Layer Internal • Golang in TiDB • Next Step of TiDB About Me • Shen Li (申砾) • Tech Lead of TiDB, VP of Engineering Why Go? • Productivity • Concurrency • Great for network programming • GC • Standard libraries && Tools • Good performance • Quick improvement Go in TiDB • More than 100k lines of Go code and session is hard • Account for large memory allocation • Account for memory consuming operators New in Go1.8 • Better GC • Pauses 50μs • sort.Slice Next Step of TiDB • Switch to gRPC • Document support0 码力 | 27 页 | 935.47 KB | 5 月前3Go Compile Time Instrumentation
Go compile time instrumentation Przemysław Delewski February 18, 2025 Warsaw, PolandAgenda 1. Short bio 2. Observability domain 3. OpenTelemetry 4. History of OpenTelemetry go compile time instrumentation I’m also founding member of the OpenTelemetry Go compile-time instrumentation project https://github.com/open-telemetry/community/blo b/main/projects/go-compile-instrumentation.mdSoftware complexity spanHistory of OpenTelemetry go instrumentationBeginnings of go instrumentation Everything started with two proposals: - https://github.com/open-telemetry/opentelemetry-go-instrumen tation/issues/30 码力 | 27 页 | 1.74 MB | 5 月前31.3 Go practices in TiDB 姚维
Go Practices in TiDB 姚维 PingCAP wink@pingcap.com Agenda ● How to build a stable database ○ Schrodinger-test platform ○ Failpoint injection ○ Goroutine-leak detection ● Optimization ○ Chunk vs interface{} errors.New("mock commit error") // } …. } https://github.com/pingcap/tidb/blob/master/store/tikv/txn.go#L223 The generated gofail code func (txn *tikvTxn) Commit(ctx context.Context) error { if vmockCommitError or: __fp_mockCommitError.BadType(vmockCommitError, "bool"); }; …. } $ gofail enable store/tikv/txn.go Why we need a new failpoint ● Generated code is not readable ● Concurrent testing will use the same0 码力 | 32 页 | 1.76 MB | 5 月前3Data Structures That Make Video Games Go Round
0 码力 | 196 页 | 3.03 MB | 5 月前3Hello 算法 1.2.0 繁体中文 Go 版
Hello 演算法 Go 語言版 作者:靳宇棟(@krahets) 程式碼審閱:劉代富(@Reanon) Release 1.2.0 2024‑12‑06 序 兩年前,我在力扣上分享了“劍指 Offer”系列題解,受到了許多讀者的鼓勵與支持。在與讀者交流期間,我 最常被問到的一個問題是“如何入門演算法”。漸漸地,我對這個問題產生了濃厚的興趣。 兩眼一抹黑地刷題似乎是最受歡迎的方法,簡 記錄。需要注意的是,Python 中 range(a, b) 對應的區間是“左閉右開”的,對應的走訪範圍為 ?, ? + 1, … , ? − 1 : // === File: iteration.go === /* for 迴圈 */ func forLoop(n int) int { res := 0 // 迴圈求和 1, 2, ..., n-1, n for i := 1; i <= 迴圈中,程式每輪都會先檢查條件,如果條 件為真,則繼續執行,否則就結束迴圈。 下面我們用 while 迴圈來實現求和 1 + 2 + ⋯ + ? : // === File: iteration.go === /* while 迴圈 */ func whileLoop(n int) int { res := 0 // 初始化條件變數 i := 1 // 迴圈求和 1, 2, ...,0 码力 | 385 页 | 18.80 MB | 9 月前3Hello 算法 1.2.0 简体中文 Go 版
Hello 算法 Go 语言版 作者:靳宇栋(@krahets) 代码审阅:刘代富(@Reanon) Release 1.2.0 2024‑12‑06 序 两年前,我在力扣上分享了“剑指 Offer”系列题解,受到了许多读者的鼓励和支持。在与读者交流期间,我 最常被问的一个问题是“如何入门算法”。逐渐地,我对这个问题产生了浓厚的兴趣。 两眼一抹黑地刷题似乎是最受欢迎的方法,简单、直接 记录。需要注意的是,Python 中 range(a, b) 对应的区间是“左闭右开”的,对应的遍历范围为 ?, ? + 1, … , ? − 1 : // === File: iteration.go === /* for 循环 */ func forLoop(n int) int { res := 0 // 循环求和 1, 2, ..., n-1, n for i := 1; i <= 循环中,程序每轮都会先检查条件,如果条 件为真,则继续执行,否则就结束循环。 下面我们用 while 循环来实现求和 1 + 2 + ⋯ + ? : // === File: iteration.go === /* while 循环 */ func whileLoop(n int) int { res := 0 // 初始化条件变量 i := 1 // 循环求和 1, 2, ...,0 码力 | 384 页 | 18.49 MB | 9 月前32.1.4 PingCAP Go runtime related problems in TiDB production environment
Go runtime related problems in TiDB production environment About me ● Arthur Mao(毛康力), Senior Engineer@PingCAP ● TiDB core developer (top3 contributor) ● GitBook about golang internals (@tiancaiamao) consider priority ● CPU dense workload could affect IO latency Conclusion Part II - Memory control ● Go Runtime ○ Allocated from OS (mmaped) ○ Managed Memory ■ Should the memory be returned to the OS? ○ memory footprint is abnormal ● The memory available on this node is not too much Description ● The Go Runtime thinks it does not use much memory ● The OS does not release the memory (RSS is high) Investigate0 码力 | 56 页 | 50.15 MB | 5 月前3Operator Pattern 用 Go 扩展 Kubernetes 的最佳实践
Operator Pattern:用 Go 扩展 K8s 的最佳实践 吴学强 ApeCloud KubeBlocks Maintainer & 研发总监 目 录 认识我们 00 什么是 Operator 01 Operator 基础模型 02 Operator 最佳实践 03 我们是谁 云猿生(ApeCloud)是一家提供数据库内核与管理平台的基 础软件开发商. KubeBlocks 熟悉如何生成二级资源(Managed Resource) 6. 熟悉如何写 UT 7. 熟悉如何制作 Helm Chart 课后思考题: 1. 如何不启动 WebHook? 2. API 只要用 Go 写就可以了吗,需要修改对应的 YAML 文件吗? 3. Setup 阶段,用 Watch 函数取代 Owns 并实现同样的目的。 4. Reconcile 函数为什么不区分 Create、Update0 码力 | 21 页 | 3.06 MB | 9 月前3go-zero开源项目的成长史
万俊峰Kevin go-zero 开源项⽬成⻓史 About me • go-zero 作者 • 阿⾥云MVP • 腾讯云TVP • ArchSummit 明星讲师 • GopherChina 主持⼈&⾦牌讲师 • 极客时间 Go 专题出品⼈ • 腾讯云开发者⼤会讲师 TOC ● go-zero 的由来 ● go-zero 的现状 ● go-zero 的成⻓阶段 ● go-zero ● go-zero 社区发展思考 ● go-zero 的未来 go-zero 的由来 • 源起 2013 • 业务驱动、业务⽀撑 • 经历过的业务 • 经历过的 Go 发展阶段 go-zero 的现状 • star 增⻓趋势 • contributors • ⽤户 • 社区⽤户 • 企业⽤户 • 质量标准 • 需求 • PR 标准 go-zero PR要求 • CI检测,格式、安全、单测 • 修改或新增代码必须单测覆盖 go-zero 发展阶段 • ⼀年⼀万星 • 两年两万星 • 第三个年头 go-zero 开源伊始 • 开源 ≠ 代码提交到 GitHub • 规划发展路线 • 梳理推⼴思路 • 找渠道、建社区 • 分析⽤户 go-zero 开源伊始 • 定⽬标 • 找渠道 • 建社区 • 有数据驱动的思维0 码力 | 31 页 | 4.83 MB | 9 月前3
共 303 条
- 1
- 2
- 3
- 4
- 5
- 6
- 31