エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Go - what can you do? - Interfaces - type assertions - 計算機科学のブログ
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Go - what can you do? - Interfaces - type assertions - 計算機科学のブログ
Head First Go、 Jay McGavren(著)、O’Reilly Media)の Chapter 11(what can you do? - Interfaces)、p.... Head First Go、 Jay McGavren(著)、O’Reilly Media)の Chapter 11(what can you do? - Interfaces)、p.339(Pool Puzzle)の解答を求めてみる。 コード main.go package main import "fmt" type Truck string func (t Truck) Accelerate() { fmt.Println("Speeding up") } func (t Truck) Brake() { fmt.Println("Stopping") } func (t Truck) Steer(direction string) { fmt.Println("Turning", direction) } func (t Truck) LoadCargo(cargo string)

