Skip to content

Commit f72a6a6

Browse files
Use import option in the Go strip_enum_prefix feature example.
`import option` is recommended when importing features. Use it, similarly to the rest of this document. This feature was introduced in edition 2024, which supports `import option`. PiperOrigin-RevId: 1020756558
1 parent 51aa6af commit f72a6a6

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎content/editions/features.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ You can set the `api_level` feature starting in edition 2023:
793793
```proto
794794
edition = "2023";
795795
796-
import option "third_party/golang/protobuf/v2/src/google/protobuf/go_features.proto";
796+
import option "google/protobuf/go_features.proto";
797797
798798
// Remove this line after migrating the code to the Opaque API.
799799
option features.(pb.go).api_level = API_HYBRID;
@@ -993,8 +993,8 @@ edition = "2024";
993993
994994
import "myproject/proto3file.proto";
995995
996-
import option "third_party/protobuf/cpp_features.proto";
997-
import option "third_party/java/protobuf/java_features.proto";
996+
import option "google/protobuf/cpp_features.proto";
997+
import option "google/protobuf/java_features.proto";
998998
999999
message Msg {
10001000
myproject.proto3file.Proto3Enum name = 1 [
@@ -1092,7 +1092,7 @@ After running Prototiller, the equivalent code might look like this:
10921092
```proto
10931093
edition = "2024";
10941094
1095-
import option "third_party/protobuf/cpp_features.proto";
1095+
import option "google/protobuf/cpp_features.proto";
10961096
10971097
message Foo {
10981098
string bar = 6 [features.(pb.cpp).string_type = STRING];
@@ -1116,7 +1116,7 @@ After running Prototiller, the equivalent code might look like this:
11161116
```proto
11171117
edition = "2024";
11181118
1119-
import option "third_party/protobuf/cpp_features.proto";
1119+
import option "google/protobuf/cpp_features.proto";
11201120
11211121
message Foo {
11221122
string bar = 6 [features.(pb.cpp).string_type = STRING];
@@ -1243,7 +1243,7 @@ files:
12431243
```proto
12441244
edition = "2024";
12451245
1246-
import "google/protobuf/go_features.proto";
1246+
import option "google/protobuf/go_features.proto";
12471247
12481248
option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP;
12491249
@@ -1329,9 +1329,9 @@ Edition 2024.
13291329
// foo/bar_baz.proto
13301330
edition = "2024";
13311331
1332-
import option "third_party/protobuf/cpp_features.proto";
1333-
import option "third_party/java/protobuf/java_features.proto";
1334-
import option "third_party/golang/protobuf/v2/src/google/protobuf/go_features.proto";
1332+
import option "google/protobuf/cpp_features.proto";
1333+
import option "google/protobuf/java_features.proto";
1334+
import option "google/protobuf/go_features.proto";
13351335
13361336
// If previously relying on edition 2023 default java_outer_classname.
13371337
option java_outer_classname = "BarBaz" // or BarBazOuterClass

0 commit comments

Comments
 (0)