Goでプログラミングを始める
初心者向けの実践的なゴー言語入門です。小さな、扱いやすいレッスンに分けられた構成で、宇宙探査をテーマに、命令型プログラミング、型、関数、メソッド、コレクション、状態、並行処理をカバーしています。
コース概要
📚 コンテンツ概要
初心者向け、実践的なゴー(Go)プログラミング言語の入門。本コースは、宇宙探査をテーマにした小さな学習モジュールに分けられ、命令型プログラミング、型、関数、メソッド、コレクション、状態、並行処理について学びます。
小規模なレッスンと7つの宇宙探査プロジェクトを通じて、ゴーでコーディングする楽しさを発見しましょう。
著者: ナサン・ヤングマン、ロジャー・ペッペ
謝辞: ジェニファー・ストゥート、マリナ・マイケルズ、マシュー・メルケス、ジョエル・コタルスキ、アレクサンドル・ドラゴサヴリエヴィッチ、リニー・フランス、オルガ・シャラキナ、エリック・ゼレイア、エイプリル・ミルン、モニカ・カムスヴァーグ。
🎯 学習目標
- ゴー言語の定義と主な用途を説明できる。
- ゴー コンパイラの役割とインタプリタとの利点を説明できる。
- ゴー プレイグラウンドを使ってコードを記述・コンパイル・実行できる。
- 必須の「ワン・トゥルーブレイススタイル」を正しく使用し、構文エラーを回避できる。
- 多様な変数宣言手法と算術代入演算子を使ってデータを管理できる。
- 乱数を生成し、分岐や論理演算子を使って条件付きロジックを実装できる。
float32およびfloat64を使って浮動小数点変数を宣言・フォーマットし、特定の幅と精度を指定できる。- 浮動小数点の不正確さや整数のオーバーフローによるエラーを識別・緩和できる。
bigパッケージと無型定数を使用して、標準ビットサイズを超える数値を扱える。- パラメータ、引数、可変長引数構文を使って関数を定義・呼び出せる。
レッスン 共 8 课时 · 预计 24.0h
レッスン
Lesson
This lesson introduces Go as a high-performance, open-source language designed for cloud-native infrastructure and large-scale software engineering. Students will explore Go's core pillars of simplicity, efficiency, and reliability, and learn how its compiler facilitates error detection and maintainable code for complex distributed systems.
This lesson introduces the fundamentals of imperative programming in Go, focusing on the mandatory main package and func main() entry point. Students will also learn the importance of Go’s "One True Brace Style" and how the compiler's automatic semicolon insertion rules dictate specific syntax requirements.
This lesson explores the limitations of binary floating-point arithmetic in Go, explaining why decimal fractions like 0.1 cannot be represented precisely due to base-2 conversion errors. Students will learn to navigate the trade-offs between float32 and float64, emphasizing the importance of avoiding floating-point types for financial calculations and using appropriate precision for scientific data.
This lesson explores the principles of modularity in Go, focusing on how functions, abstraction, and the DRY (Don't Repeat Yourself) principle improve code maintainability and reduce complexity. Students will learn to define clear module boundaries and interfaces to build robust, scalable software systems.
This lesson introduces arrays in Go as fixed-length, type-specific collections used to manage bulk data efficiently. Students will learn how to use composite literals for initialization, navigate zero-based indices, and understand the importance of memory safety to avoid runtime panics.
This lesson introduces Go structures (structs) as a method for grouping disparate data types into cohesive, atomic units for better organization. Students will learn to define and manipulate these structures to manage complex telemetry data, such as Martian habitat coordinates and rover status, more effectively than with individual variables.
This lesson explores the concept of indirection in Go, focusing on how pointers store memory addresses to manage shared data efficiently. Students will learn to use the address operator (&) and dereference operator (*) to manipulate data, while applying these concepts to build performant, shared-state structures like a Sudoku validator.
This lesson explores concurrency in Go, focusing on using goroutines to manage independent tasks and synchronization tools like mutexes and select statements. Students will learn how to handle non-deterministic execution and implement robust worker patterns for multi-agent systems.