ซอร์สโค้ด Go
ไฟล์ Go (Golang) บรรจุซอร์สโค้ดสำหรับภาษาโปรแกรมระบบของ Google Go เก่งในการสร้างเซิร์ฟเวอร์ประสิทธิภาพสูง เครื่องมือ CLI และเครื่องมือคลาวด์เนทีฟ
ประเภท MIME
text/x-go
ประเภท
ข้อความ
การบีบอัด
ไม่สูญเสียคุณภาพ
ข้อดี
- + Compiles to a single static binary — no dependencies
- + Goroutines make concurrent programming simple and efficient
- + Fast compilation and excellent runtime performance
- + Enforced code formatting with go fmt
ข้อเสีย
- − No generics until Go 1.18 (2022) — still maturing
- − Error handling is verbose (if err != nil pattern)
- − No inheritance or traditional OOP features
เมื่อใดควรใช้ .GO
ใช้ Go สำหรับเซิร์ฟเวอร์ ไมโครเซอร์วิส เครื่องมือ CLI ยูทิลิตี DevOps และซอฟต์แวร์ที่ต้องการความเรียบง่ายและประสิทธิภาพ
รายละเอียดทางเทคนิค
Go เป็นภาษาชนิดข้อมูลสถิตพร้อม garbage collection, goroutines สำหรับ concurrency แบบเบา, channels สำหรับการสื่อสาร และคอมไพล์เป็นไบนารีเดียวแบบ statically linked
ประวัติ
Robert Griesemer, Rob Pike และ Ken Thompson ออกแบบ Go ที่ Google ในปี 2007 เปิดเป็นโอเพนซอร์สในปี 2009 Go 1.0 เสถียรในปี 2012 และ Go ยังคงรักษาความเข้ากันได้ย้อนหลัง