Registering packages in Go without cyclic dependency
The standard library solves this problem in multiple ways: 1) Without a “Central” Registry Example of this is the different hash algorithms. The crypto package just defines the Hash interface (the type and its methods). Concrete implementations are in different packages (actually subfolders but doesn’t need to be) for example crypto/md5 and crypto/sha256. When you … Read more