Go Design Patterns by 2017

Go Design Patterns by 2017

Author:2017
Language: eng
Format: epub, mobi
Publisher: Packt Publishing


Final words on the Strategy pattern

We have learned a powerful way to encapsulate algorithms in different structs. We have also used embedding instead of inheritance to provide cross-functionality between types, which will come in handy very often in our apps. You'll find yourself combining strategies here and there as we have seen in the second example, where we have strategies for logging and writing by using the io.Writer interface, a strategy for byte-streaming operations.

Chain of responsibility design pattern



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.