MCPcopy Create free account
hub / github.com/github/gh-aw / Error

Method Error

pkg/parser/import_error.go:30–35  ·  view source on GitHub ↗

Error returns the error message for ImportCycleError

()

Source from the content-addressed store, hash-verified

28
29// Error returns the error message for ImportCycleError
30func (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
38func FormatImportCycleError(err *ImportCycleError) error {

Calls

no outgoing calls