{"modulePath":"github.com/fossas/fossa-cli","version":"v1.1.10","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\n## Variables\n\n```go\nvar ArgumentModuleMessage = `\n\n` + wordwrap.WrapString(\"Did you misspell the command? Run \"+color.HiGreenString(\"fossa -h\")+\" to view supported commands\", width) + `\n\nAre you trying to scan a single module? Try:\nfossa [global options] \u003cpackage_type\u003e:\u003ctarget\u003e\nFor example: ` + color.GreenString(\"fossa --show-output golang:modulename\")\n```\n\n```go\nvar NoAPIKeyMessage = `\n\n` + wordwrap.WrapString(\"Running `fossa analyze` performs a dependency analysis and uploads the result to FOSSA. To run an analysis without uploading results, run:\", width) + `\n\n    ` + color.HiGreenString(\"fossa analyze --output\") + `\n\n` + wordwrap.WrapString(\"You can provide your API key by setting the $FOSSA_API_KEY environment variable. For example, try running:\", width) + `\n\n    ` + color.HiGreenString(\"FOSSA_API_KEY=\u003cYOUR_API_KEY_HERE\u003e $command\") + `\n\n` + wordwrap.WrapString(\"You can create an API key for your FOSSA account at:\", width) + `\n    \n    ` + color.HiBlueString(\"app.fossa.com/account/settings/integrations/api_tokens\") + `\n\n`\n```\n\n```go\nvar NotImplementedMessage = `This code path has not yet been implemented.`\n```\n\n```go\nvar ReportBugMessage = `\n\n` + color.HiYellowString(\"REPORTING A BUG:\") + `\n` + wordwrap.WrapString(\"Please try troubleshooting before filing a bug. If the suggestions do not help you can file a bug at \"+color.HiBlueString(\"https://github.com/fossas/fossa-cli/issues/new\")+\".\", width) + `\n` + wordwrap.WrapString(\"Please attach the debug logs from:\", width) + `\n\n  ` + color.HiGreenString(\"fossa \u003ccmd\u003e --debug\") + `\n\n` + wordwrap.WrapString(\"For additional support, contact \"+color.MagentaString(\"support@fossa.com\")+\".\", width)\n```\n\n## Functions\n\n```go\nfunc Errorf(format string, args ...interface{}) error\n```\n\n```go\nfunc New(msg string) error\n```\n\n```go\nfunc Wrap(cause error, msg string) error\n```\n\n```go\nfunc Wrapf(cause error, format string, args ...interface{}) error\n```\n\n## Types\n\n```go\ntype Error struct {\n\tExitCode        int\n\tCause           error  // Base error.\n\tType            Type   // Type helps us tell the user to log an issue, go to docs, etc.\n\tMessage         string // Help message for the user, contact support, opening an issue, etc.\n\tTroubleshooting string // Simple solution or debugging instructions.\n\tLink            string // Link to documentation or reference information.\n}\n```\nError is the fossa implementation of errors for providing user-friendly information.\n\n```go\nfunc NotImplementedError() *Error\n```\nNotImplemented should be used to signify that a code path is not yet implemented.\n\n```go\nfunc UnknownError(err error, message string) *Error\n```\nUnknownError creates a simple fossa error using an existing error and additional context.\n\n```go\nfunc (e *Error) Error() string\n```\n\n```go\nfunc (err *Error) WrapCause(msg string) *Error\n```\n\n```go\ntype Type = int\n```\n\n```go\nconst (\n\tUser Type = iota\n\tExec\n\tUnknown\n\tNotImplemented\n)\n```\n\n","path":"github.com/fossas/fossa-cli/errors","name":"errors","synopsis":"","isRedistributable":true}
