Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Understanding the interface

Understanding the interface

CA.go 20170621

Avatar for minionsobe

minionsobe

June 21, 2017

Other Decks in Technology

Transcript

  1. Huang Yumin Oliver @oliverminion - - at AmebaOwnd (CyberAgent, inc.)

    - - as Server Side Engineer (System Administorator) - - for 2+ years (golang) - - has Cooker interface
  2. Agenda - - What is a Go interface ? -

    - Why using an interface ? - - Go interface in Ownd ! - - Where is the reflect ?
  3. sortable interface Sort Algorithms Interface - data が Interface の

    methods を 持っていれば - Sort Algorithms が使える - Sort Algorithm はdata の型に依 存しない
  4. Hide Implementation Detail Adv. - - API から 実装を切り離せる -

    実装(implementation)の追加、変更、etc が簡単に行える
  5. “Reflection is never clear” - Rob Pike in his Go

    Proverbs reflect は 次回またのご機会があります時に ... - Next Time...
  6. Huang Yumin Oliver @oliverminion - - at AmebaOwnd (CyberAgent, inc.)

    - - as Server Side Engineer (System Administorator) - - for 2+ years (golang) - - has Cooker interface