()
| 86 | } |
| 87 | |
| 88 | func (i *SystemInfo) DefaultOutputs() []Output { |
| 89 | if i == nil { |
| 90 | return nil |
| 91 | } |
| 92 | |
| 93 | if len(i.Outputs) == 0 { |
| 94 | return nil |
| 95 | } |
| 96 | |
| 97 | res := []Output{} |
| 98 | for _, output := range i.Outputs { |
| 99 | if output.Default { |
| 100 | res = append(res, output) |
| 101 | } |
| 102 | } |
| 103 | if len(res) > 0 { |
| 104 | return res |
| 105 | } |
| 106 | |
| 107 | // If no default outputs, return the first one |
| 108 | return []Output{i.Outputs[0]} |
| 109 | } |
| 110 | |
| 111 | func (i *SystemInfo) Equals(other *SystemInfo) bool { |
| 112 | if i == nil || other == nil { |
no outgoing calls
no test coverage detected