getPositionToStringSet provides a string representation for each Position enum. The exhaustive linter is configured to check that this map is complete.
()
| 1109 | { |
| 1110 | Vendor: string(web_platform_dx__web_features_mappings.Mozilla), |
| 1111 | Position: string(web_platform_dx__web_features_mappings.Positive), |
| 1112 | URL: "https://example.com/mozilla", |
| 1113 | Concerns: nil, |
| 1114 | }, |
| 1115 | { |
| 1116 | Vendor: string(web_platform_dx__web_features_mappings.Apple), |
| 1117 | Position: string(web_platform_dx__web_features_mappings.Negative), |
| 1118 | URL: "https://example.com/webkit", |
| 1119 | Concerns: nil, |
| 1120 | }, |
| 1121 | } |
| 1122 | } else { |
| 1123 | // 90% chance of having a mapping for other features |
| 1124 | if r.Intn(10) < 9 { |
| 1125 | allVendors := getAllVendors() |
| 1126 | allVendorPositions := getAllVendorPositions() |
no outgoing calls
no test coverage detected