O'Reilly logo

Go: Design Patterns for Real-World Projects by Mat Ryer, Mario Castro Contreras, Vladimir Vivien

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

This chapter has dealt with three extremely powerful patterns that require a lot of practice before using them in production code. It's a very good idea to make some exercises with them by simulating typical production problems:

  • Create a simple REST server that reuses most of the error-checking and connection functionality to provide an easy-to-use interface to practice the Template pattern
  • Make a small library that can write to different databases but only in the case that all writes were OK, or delete the newly created writes to practice Memento for example
  • Write your own language, to make simple things such as answering simple questions like bots usually do so you can practice a bit of the Interpreter pattern

The idea is to practice coding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required