Documentation ¶
Overview ¶
Package protostrs contains common string manipulation functionality for Protobuf packages and files.
This is used in the format, lint, and create packages. The Java rules in this package roughly follow https://cloud.google.com/apis/design/file_structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoPackage ¶
GoPackage returns the value for the file option "go_package" given a package name. This will be equal to the last value of the package separated by "."s, followed by "pb". If packageName is empty, this will return an empty string.
func JavaOuterClassname ¶
JavaOuterClassname returns the value for the file option "java_outer_classname" given a file name. This will be equal to the basename of the file with it's extension stripped, UpperCamelCased, followed by "Proto". If filename is empty, this will return an empty string.
func JavaPackage ¶
JavaPackage returns the value for the file option "java_package" given a package name. This will be equal to "com." followed by the package. If packageName is empty, this will return an empty string.
Types ¶
This section is empty.