Post

GoLangGoLang

v
victoria mamidi

Posted on 16th April 2024|247 views

0
votes

Golang Import Cycle Not Allowed

Why do we encounter the error called “import cycle not allowed”?

I see this error when I am trying to test my controller can anyone help me?

 

Answers
P
Tom 234

Posted on 16th April 2024

You may be using the method with the same name as the package look at the example to understand what I meant.

In PyGtk.go:

Package PyGtk

func PyGtk(){...}

In PyGtk_test.go: 

Package PyGtk

pygtk.PyGtk()// this is the issue you are already in the package PyGtk there is no need to use pygtk.PyGtk to access PyGtk()

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos