如何在go代码中找到导入周期在哪里?

I am fed up with the error

main.go:10:5: import cycle not allowed

The bug does not give information, where is the dependency cycle and does not even tell which file is the problem. Is there a way I can find out the dependency cycle or dependency diagram in go? As the codebase goes large its very difficult to deduce this.

And the collective answer based on comments above:

Its a known issue, recently fixed so look out for a new release or compile the go tool from source.

(Contributed by: @MatrixFrog, @infantDev, @jnml and @nemo)