Lesson 24. Interfaces

After reading lesson 24, you’ll be able to

  • Get your types talking
  • Discover interfaces as you go
  • Explore interfaces in the standard library
  • Save humanity from a Martian invasion

Pen and paper aren’t the only tools you could use to jot down your latest insight. A nearby crayon and napkin can serve the purpose. Crayons, permanent markers, and mechanical pencils can all satisfy your need to write a reminder in a notepad, a slogan on construction paper, or an entry in a journal. Writing is very flexible.

The Go standard library has an interface for writing. It goes by the name of Writer, and with it you can write text, images, comma-separated values (CSV), compressed archives, and more. You can write to the screen, a file ...

Get Get Programming with Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.