INNER CODE UNIT · Go

brandNames

shurcooL/githubv4 · gen.go:181

			var brandNames = map[string]string{ // Augments the list in ident.
				"LINKEDIN": "LinkedIn",
				"YOUTUBE":  "YouTube",
			}
			switch brand, isBrand := brandNames[value]; {
			case enum == "SponsorsCountryOrRegionCode":
				// These enum values are country/region codes like "CA" or "US"
				// rather than words, so don't try to convert them to mixed caps.
				return enum + value
			case value == "SCIM":
				// An initialism or acronym that ident doesn't know about.
				// Use it as is to preserve its consistent case (https://go.dev/s/style#initialisms).
				return enum + value
			case isBrand:
				// Brand name that ident doesn't know about.
				return enum + brand
			default:
				return enum + ident.ParseScreamingSnakeCase(value).ToMixedCaps()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…