MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / getPositionToStringSet

Function getPositionToStringSet

util/cmd/load_fake_data/main.go:1111–1123  ·  view source on GitHub ↗

getPositionToStringSet provides a string representation for each Position enum. The exhaustive linter is configured to check that this map is complete.

()

Source from the content-addressed store, hash-verified

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()

Callers 1

getAllVendorPositionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected