Error returns the error message for ImportCycleError
()
| 28 | |
| 29 | // Error returns the error message for ImportCycleError |
| 30 | func (e *ImportCycleError) Error() string { |
| 31 | if len(e.Chain) == 0 { |
| 32 | return "circular import detected" |
| 33 | } |
| 34 | return "circular import detected: " + strings.Join(e.Chain, " → ") |
| 35 | } |
| 36 | |
| 37 | // FormatImportCycleError formats an import cycle error with a delightful multiline indented display |
| 38 | func FormatImportCycleError(err *ImportCycleError) error { |
no outgoing calls