Skip to Content
Learning Functional Programming in Go
book

Learning Functional Programming in Go

by Lex Sheehan
November 2017
Intermediate to advanced
670 pages
17h 35m
English
Packt Publishing
Content preview from Learning Functional Programming in Go

Adding Functionality with Decoration

In this chapter, we'll continue to address this remark: If you like design patterns, use Java, not Go. We'll do so with the help of the decorator and strategy patterns.

Our goal in this chapter is to understand:

  • Go's Reader and Writer interfaces
  • Why designing using the interface composition is better than type hierarchy design
  • How to design with and implement the Decorator Pattern
  • Inversion of Control (IoC) by implementing an IoC framework
  • How to set up a request timeout using a proxy 
  • How to apply the Strategy Pattern when load balancing requests
  • How to understand easy-metrics graphs
  • How to implement a simple yet effective logger using standard library interfaces
  • How to enrich HTTP requests with logging ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781787281394Supplemental Content