学習パス

構造体とインターフェース

構造体、メソッド、ポインター、インターフェース、埋め込み、エラー、ジェネリクス。

レッスン 9 件 · チャレンジ 14 件

  1. レッスン チャレンジ 1 件 Structs Group related values into your own type with named fields.
  2. レッスン チャレンジ 2 件 Methods and Receivers Attach functions to a type and choose between value and pointer receivers.
  3. レッスン チャレンジ 2 件 Pointers Use & and * to share a value instead of copying it.
  4. レッスン チャレンジ 2 件 Interfaces Describe behavior with an interface that any type can satisfy.
  5. レッスン チャレンジ 2 件 Struct Embedding and Composition Reuse fields and methods by embedding one struct in another.
  6. レッスン チャレンジ 1 件 Temperature Converter Convert between Celsius and Fahrenheit with your own number types.
  7. レッスン チャレンジ 2 件 Error Handling Return errors as values, wrap them with context and check them with errors.Is and errors.As.
  8. レッスン チャレンジ 1 件 Bank Account with Errors Model deposits and withdrawals that can fail with your own error types.
  9. レッスン チャレンジ 1 件 Generics Write one function or type that works with many types using type parameters.