.go
Code
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を使うタイミング
サーバー、マイクロサービス、CLIツール、DevOpsユーティリティ、シンプルさとパフォーマンスが重要なソフトウェアにGoを使用してください。
技術的詳細
Goはガベージコレクション付きの静的型付け言語で、軽量な並行処理のためのgoroutine、通信のためのチャネル、シンプルなモジュールシステムを持ちます。go fmtが正規のフォーマットスタイルを強制します。
歴史
Robert Griesemer、Rob Pike、Ken ThompsonがGoogleで2007年にGoを設計し、2009年にオープンソースとしてリリースしました。Go 1.0は2012年に強力な互換性保証とともにリリースされました。