Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
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.
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.