( code string, title string, message string, severity string, suggestedCommand string, evidence map[string]any, cause error, )
| 644 | } |
| 645 | |
| 646 | func forceRunDiagnosticError( |
| 647 | code string, |
| 648 | title string, |
| 649 | message string, |
| 650 | severity string, |
| 651 | suggestedCommand string, |
| 652 | evidence map[string]any, |
| 653 | cause error, |
| 654 | ) error { |
| 655 | item := diagnosticitems.NewItem( |
| 656 | "task.force."+code, |
| 657 | code, |
| 658 | diagnosticcontract.CategoryTask, |
| 659 | title, |
| 660 | message, |
| 661 | severity, |
| 662 | diagnosticcontract.FreshnessLive, |
| 663 | diagnosticitems.WithDocURL(forceOpsDocURL), |
| 664 | diagnosticitems.WithSuggestedCommand(suggestedCommand), |
| 665 | diagnosticitems.WithEvidence(evidence), |
| 666 | ) |
| 667 | return diagnosticitems.NewStructuredError(item, cause) |
| 668 | } |
| 669 | |
| 670 | func optionalPayloadTime(value time.Time) *time.Time { |
| 671 | if value.IsZero() { |
no outgoing calls
no test coverage detected