> > So, I'll probably have to keep using multiple packages if I can somehow > figure out how to solve > the package import cycle problem. >
The most common solution is to factor out the aspects which cause the cycle > into a third package that one or both of the current packages imports. In > my four decades of programming I've only seen one import cycle (in Python) > that was hard to remove. My team eventually used the "Python lazy import" > hack. Refactoring the code to eliminate the import cycle, and therefore the > hack to handle it, was high on my team's priority list when I left the > project. > In Go interfaces can also sometimes be helpful in eliminating import cycles -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/363e950d-df84-41a0-afcf-78c1143631c3n%40googlegroups.com.