Go (Golang) — ภาพรวม
หมวดนี้คือ template หลัก ของเว็บไซต์ Tech Stack Playbook — โครงสร้าง, สไตล์การเขียน, และระดับความลึกของเนื้อหาที่นี่จะถูกใช้เป็นแบบอย่างกับหมวดอื่น (Kubernetes, Kafka, OpenShift, Unit Testing) ในสเตปถัดไป
เนื้อหาเขียนแบบ bilingual ต่อหัวข้อ: อธิบายเป็นภาษาไทยในเนื้อหาหลัก (อ่านง่าย เข้าใจเร็ว) และปิดท้ายแต่ละหัวข้อใหญ่ด้วยกล่อง English Summary สำหรับฝึกตอบสัมภาษณ์เป็นภาษาอังกฤษ
ใครควรอ่านหมวดนี้
- Engineer ที่ใช้ Go ในงานประจำวัน ต้องการ refresh fundamentals + best practice
- คนที่กำลังเตรียมสัมภาษณ์งานที่ใช้ Go เป็นหลัก (ทั้งแบบ conceptual และ live coding)
- คนที่ต้องรีวิวโค้ด Go ของทีม และอยากมี checklist อ้างอิง
โครงสร้างเนื้อหา
| หัวข้อ | เนื้อหา |
|---|---|
| Fundamentals | Syntax, types, structs, interfaces, pointers, error handling idioms |
| Concurrency | Goroutines, channels, select, sync package, context, pitfalls |
| Project Structure | Standard layout, package design, dependency injection |
| Testing | Table-driven tests, mocking, testify, benchmark |
| Best Practices | Error handling, naming, performance, code review checklist |
| Interview Prep | คำถามสัมภาษณ์ที่พบบ่อย พร้อมแนวคำตอบ (ไทย/อังกฤษ) |
| Live Coding | โจทย์ live coding ตัวอย่าง + วิธีคิด + เทคนิคตอนสัมภาษณ์ |
วิธีใช้งานหมวดนี้
- ถ้าใช้ Go อยู่แล้ว ข้ามไป Best Practices และ Interview Prep ได้เลย
- ถ้าเพิ่งเริ่ม ไล่อ่านตามลำดับตั้งแต่ Fundamentals
- ก่อนสัมภาษณ์ 1-2 วัน ให้ซ้อมทำโจทย์ใน Live Coding แบบจับเวลา พูดออกเสียงไปด้วย
English Summary
This section is the reference template for the whole Tech Stack Playbook. Content is bilingual per topic: Thai prose for the main explanation, with an English Summary callout (like this one) at the end of each major section — useful for rehearsing technical interview answers in English.