From 5aff4318889d49d02bd402abbe83976c88b26f50 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 25 Oct 2024 01:20:18 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 689689361 --- go/go_features.proto | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/go/go_features.proto b/go/go_features.proto index ceb3a13d0f2d..a7e14f85e729 100644 --- a/go/go_features.proto +++ b/go/go_features.proto @@ -54,4 +54,26 @@ message GoFeatures { edition_defaults = { edition: EDITION_LEGACY, value: "API_LEVEL_UNSPECIFIED" }, edition_defaults = { edition: EDITION_2024, value: "API_OPAQUE" } ]; + + enum StripEnumPrefix { + STRIP_ENUM_PREFIX_UNSPECIFIED = 0; + STRIP_ENUM_PREFIX_KEEP = 1; + STRIP_ENUM_PREFIX_GENERATE_BOTH = 2; + STRIP_ENUM_PREFIX_STRIP = 3; + } + + optional StripEnumPrefix strip_enum_prefix = 3 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_ENUM_ENTRY, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2024, + }, + // TODO: change the default to STRIP_ENUM_PREFIX_STRIP for edition 2025. + edition_defaults = { + edition: EDITION_LEGACY, + value: "STRIP_ENUM_PREFIX_KEEP" + } + ]; }