Use proto.encode_text in proto.encode_text doc examples.
Closes
@@ -100,34 +100,35 @@ public final class StarlarkLibrary {
+ "Entries are emitted in iteration (insertion) order.\n"
+ "The dict's keys must be strings, ints, or bools, and its values must not be"
+ " sequences or dicts.\n"
- + "Examples:<br><pre class=language-python>struct(field=123).to_proto()\n"
+ + "Examples:<br><pre class=language-python>proto.encode_text(struct(field=123))\n"
+ "# field: 123\n\n"
- + "struct(field=True).to_proto()\n"
+ + "proto.encode_text(struct(field=True))\n"
+ "# field: true\n\n"
- + "struct(field=[1, 2, 3]).to_proto()\n"
+ + "proto.encode_text(struct(field=[1, 2, 3]))\n"
+ "# field: 1\n"
+ "# field: 2\n"
+ "# field: 3\n\n"
- + "struct(field='text').to_proto()\n"
+ + "proto.encode_text(struct(field='text'))\n"
+ "# field: \"text\"\n\n"
- + "struct(field=struct(inner_field='text')).to_proto()\n"
+ + "proto.encode_text(struct(field=struct(inner_field='text')))\n"
+ "# field {\n"
+ "# inner_field: \"text\"\n"
+ "# }\n\n"
- + "struct(field=[struct(inner_field=1), struct(inner_field=2)]).to_proto()\n"
+ + "proto.encode_text(struct(field=[struct(inner_field=1),"
+ + " struct(inner_field=2)]))\n"
+ "# field {\n"
+ "# inner_field: 1\n"
+ "# }\n"
+ "# field {\n"
+ "# inner_field: 2\n"
+ "# }\n\n"
- + "struct(field=struct(inner_field=struct(inner_inner_field='text'))).to_proto()\n"
+ + "proto.encode_text(struct(field=struct(inner_field=struct(inner_inner_field='text'))))\n"
+ "# field {\n"
+ "# inner_field {\n"
+ "# inner_inner_field: \"text\"\n"
+ "# }\n"
+ "# }\n\n"
- + "struct(foo={4: 3, 2: 1}).to_proto()\n"
+ + "proto.encode_text(struct(foo={4: 3, 2: 1}))\n"
+ "# foo: {\n"
+ "# key: 4\n"
+ "# value: 3\n"
