Any good advice about how to avoid import cycle in Go?

go list -f '{{join .Deps "\n"}}' <import-path>

Will show import dependencies for package at <import-path> – or in current directory if <import-path> is left empty. Alternatively

go list -f '{{join .DepsErrors "\n"}}' <import-path>

hopefully shows some useful information in your case. See also the output of

go help list

for additional information about the go list tool.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)