---
title: "Discussion on \"Open-Closed Principle in Go\" | Hashnode"
description: "Discussion on \"Open-Closed Principle in Go\". Introduction\nThe Open-Closed Principle states that types should be open for extension, but closed for modification.\nAnalogy\nLets assume we're operating an online store, and we want end users to be able to filter the items by certain criteria ex. by p..."
url: "https://hashnode.com/posts/open-closed-principle-in-go/5ebfb3b26bace2452f98b76d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Open-Closed Principle in Go](https://fabcodes.hashnode.dev/open-closed-principle-in-go?utm_source=hashnode&utm_medium=feed)

Introduction The Open-Closed Principle states that types should be open for extension, but closed for modification. Analogy Lets assume we're operating an online store, and we want end users to be able to filter the items by certain criteria ex. by p...

May 16, 2020 · fabcodes.hashnode.dev  
Read the article

-   [#go](https://hashnode.com/tag/go)
-   [#design-patterns](https://hashnode.com/tag/design-patterns)
-   [#solid](https://hashnode.com/tag/solid)
-   [#go-cjidm6n1p00lpq9s29dy2bsiq](https://hashnode.com/tag/go-cjidm6n1p00lpq9s29dy2bsiq)
-   [#golang](https://hashnode.com/tag/golang)

## Written by

[Fakorede Abiola](https://hashnode.com/@thefabdev)

@thefabdev · Lagos, Nigeria

  
[View profile](https://hashnode.com/@thefabdev)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
