Why is the principle stating that "interfaces should belong to the package that uses values of the interface type, not the package that implements those values" sometimes violated?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • etcd

    Distributed reliable key-value store for the most critical data of a distributed system

    While exploring popular projects such as etcd and especially traefik, I noticed a violation of the principle that states "interfaces should belong to the package that uses values of the interface type, not the package that implements those values." For example, Here we can see that ManagerFactory import Registry interface that placed here and implementations of this interface in the same package, which violates the aforementioned principle. Even if the interface is simply a specification, it should still be defined on the consumer side. Is it considered bad practice to follow what traefik does in this case or I doesn't understand somthing? P.S. I'm newcomer, so sorry if it's silly question.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • traefik

    The Cloud Native Application Proxy

    While exploring popular projects such as etcd and especially traefik, I noticed a violation of the principle that states "interfaces should belong to the package that uses values of the interface type, not the package that implements those values." For example, Here we can see that ManagerFactory import Registry interface that placed here and implementations of this interface in the same package, which violates the aforementioned principle. Even if the interface is simply a specification, it should still be defined on the consumer side. Is it considered bad practice to follow what traefik does in this case or I doesn't understand somthing? P.S. I'm newcomer, so sorry if it's silly question.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • šŸ’”Hosted ETCD aaS

    2 projects | dev.to | 10 Jan 2023
  • Kubernetes CRD: the versioning joy

    1 project | dev.to | 4 Jul 2024
  • Is Kubernetes a database? CRDs explained in five minutes

    1 project | dev.to | 24 May 2024
  • Deploying Web Apps with Caddy: A Beginner's Guide Caddy

    5 projects | news.ycombinator.com | 27 Feb 2024
  • Oracle Linux 8.8'de PostgreSQL 13 Yedekli Yapı Nasıl Kurulur? - Patroni, ETCD, HAProxy

    1 project | dev.to | 7 Dec 2023

Did you konow that Go is
the 4th most popular programming language
based on number of metions?