Summary

Completed

In this lesson, we explored how to write reusable and extensible code with Go, even though the language doesn't completely follow the OOP paradigm.

Go handles method encapsulation by allowing a method's implementation details to be hidden from another package, but not the originating package. Go supports method overloading and embedding. You can override the implementation of a method to support different uses.

With the Go language, you can extend code from the standard libraries, even if your code base ends up growing. You might use frameworks, but Go doesn't favor them because you can overwrite most of the functionality from the standard libraries.

In this module, you learned how methods work in Go. You learned that Go, unlike other programming languages, doesn't require a class object when you write reusable and extensible code.

Finally, you studied how interfaces work in Go. You explored the fundamentals of declaring and using them. You reviewed a few complex examples, such as how to create a server API, and practiced implementing interfaces.

With the knowledge you acquired, you're ready to write code that's reusable and extensible.