Episode 4! - Watch and learn how to define a function that will decide how your type is formatted and printed. -- In this video, Miki will focus on Go’s `fmt.Stringer` interface and how it can be used to control how Go prints your type. The first step he’ll take is to define an enumerated type representing different keys loosely based on the book *Ready Player One*. Miki will then implement the method required for Go’s `fmt.Stringer` interface which will specify how his enumerated type will be printed as a string.
Things you will learn in this video :
- Define a Go enum with a user-defined type.
- How to implement Go’s `fmt.Stringer` interface.
- Specify how your type is represented with string formatting.
For the full course materials visit → [ Ссылка ]
--
Do you ever find yourself implementing `fmt.Stringer`, if so, let us know why?
Comment below or tweet us on twitter & let us know, we want to hear from you! ~ If you found this video helpful, hit that like button & subscribe for more content like this.
--
Access our online courses → [ Ссылка ]
Attending a live training → [ Ссылка ]...
Other Links:
Website: [ Ссылка ]
Github: [ Ссылка ]
Twitter: [ Ссылка ]
Ещё видео!