protostrs

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2018 License: MIT Imports: 3 Imported by: 0

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

func GoPackage(packageName string) string

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

func JavaOuterClassname(filename string) string

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

func JavaPackage(packageName string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL