Episode 6! - Watch and learn how you can use type assertions to write simple, yet effective, code. -- In this video, Miki will write a versatile logging library with Go interfaces.The first prototype he proposes consists of a type with an `io.Writer` interface field to handle writing data for the logger. Upon completing the first design, Miki realizes his type is missing a `Sync` function, which will enable developers to move data into stable storage while logging. To meet this requirement, Miki will create a new interface type with a `Sync` function.
Things you will learn in this video :
- How to properly perform a type assertion on an interface.
- How to move data from memory to stable storage.
- Tips on designing an interface in Go.
For the full course materials visit → [ Ссылка ]
--
Do you agree with the Go proverb : “the bigger the interface the weaker the abstraction”?
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: [ Ссылка ]
Ещё видео!