()
| 33 | } |
| 34 | |
| 35 | func (err SystemInformationGeneralError) Error() string { |
| 36 | builder := &strings.Builder{} |
| 37 | builder.WriteString("errors found:") |
| 38 | |
| 39 | if err.OperatingSystemInformationError != nil { |
| 40 | builder.WriteString(err.OperatingSystemInformationError.Error() + ", ") |
| 41 | } |
| 42 | |
| 43 | if err.MemoryInformationError != nil { |
| 44 | builder.WriteString(err.MemoryInformationError.Error() + ", ") |
| 45 | } |
| 46 | |
| 47 | if err.FileDescriptorsInformationError != nil { |
| 48 | builder.WriteString(err.FileDescriptorsInformationError.Error() + ", ") |
| 49 | } |
| 50 | |
| 51 | if err.DiskVolumeInformationError != nil { |
| 52 | builder.WriteString(err.DiskVolumeInformationError.Error() + ", ") |
| 53 | } |
| 54 | |
| 55 | return builder.String() |
| 56 | } |
| 57 | |
| 58 | func (err SystemInformationGeneralError) MarshalJSON() ([]byte, error) { |
| 59 | data := map[string]SystemInformationError{} |
nothing calls this directly
no test coverage detected