Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Import cycle not allowed

Here is an illustration of your first import cycle problem.

                  project/controllers/account
                     ^                    \    
                    /                      \
                   /                        \ 
                  /                         \/
         project/components/mux <--- project/controllers/base
            
                   

As you can see with my bad ASCII chart, you are creating an import cycle when project/components/mux imports project/controllers/account. Since Go does not support circular dependencies you get the import cycle not allowed error during compile time.

Related Posts:

  1. MINGW64 “make build” error: “bash: make: command not found”
  2. Extracting substrings in Go
  3. Golang package is not in GOROOT (/usr/local/go/src/packageName)
  4. How to load modules from gitlab subgroup?
  5. How to import local packages in go?
  6. How to import local packages without gopath
  7. How to check if a file exists in Go?
  8. How to set GOPRIVATE environment variable
  9. Is there a queue implementation?
  10. How to print struct variables in console?
  11. Contains method for a slice
  12. How to delete an element from a Slice in Golang
  13. Go build: “Cannot find package” (even though GOPATH is set)
  14. strconv.Atoi() throwing error when given a string
  15. Is there a foreach loop in Go?
  16. How to uninstall Go?
  17. GO language: fatal error: all goroutines are asleep – deadlock
  18. What is a rune?
Categories go
How to send a GET request from PHP?
Syntax error near unexpected token ‘then’

Leave a Comment Cancel reply

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress