In the file ransuq_test.go , the file header looks like
When I try "go test ransuq", I get the error
brendan:~/Documents/mygo/src$ go test ransuq
ransuq/ransuq_test.go:6: import "ransuq/settings": package depends on
"ransuq" (import cycle)
"ransuq/settings" does indeed depend on ransuq, but I don't see how I've
introduced an import cycle. Compiling "ransuq" on its own works fine, as
does compiling ransuq/settings, so the cycle must be introduced here. I
don't see how that's possible though, given that the build tool should be
compiling this as a new package (Test files that declare a package with the
suffix "_test" will be compiled as a separate package, and then linked and
run with the main test binary.). This is the only test file in the package.
I tried to write a minimal example, but it exhibited the expected behavior
(no import cycles). Is it possible there is a bug and I should work harder
to find a minimal example, or am I misunderstanding something?
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 firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.