Skip to content

Commit

Permalink
setapi: accept API_HYBRID etc. as synonyms for HYBRID etc.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 717819659
Change-Id: I66cd6959ba5cb213587313058456ba7332986440
  • Loading branch information
stapelberg authored and copybara-github committed Jan 21, 2025
1 parent f4fb071 commit d672cb8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/o2o/setapi/setapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ var (
"OPEN": gofeaturespb.GoFeatures_API_OPEN,
"HYBRID": gofeaturespb.GoFeatures_API_HYBRID,
"OPAQUE": gofeaturespb.GoFeatures_API_OPAQUE,

// For convenience, allow enum names like API_HYBRID as synonyms.
// These are used in editions feature options lines like:
//
// option features.(pb.go).api_level = API_HYBRID;
"API_OPEN": gofeaturespb.GoFeatures_API_OPEN,
"API_HYBRID": gofeaturespb.GoFeatures_API_HYBRID,
"API_OPAQUE": gofeaturespb.GoFeatures_API_OPAQUE,
}
// Don't use the keys of apiMap to report valid values to the user, we want
// in a specific order.
Expand Down

0 comments on commit d672cb8

Please sign in to comment.