Documentation
¶
Overview ¶
Package protoio contains helper methods for proto I/O done by the testplan tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilepathAsJsonpb ¶
FilepathAsJsonpb returns a copy of path, with the extension changed to ".jsonpb". If path is the empty string, an empty string is returned. Note that this function makes no attempt to check if the input path already has a jsonproto extension; i.e. if path is "a/b/test.jsonpb", the exact same path will be returned. Thus, it is up to the caller to check the returned path is different if this is required.
func ReadBinaryOrJSONPb ¶
ReadBinaryOrJSONPb reads path into m, attempting to parse as both a binary and json encoded proto.
This function is meant as a convenience so the CLI can take either json or binary protos as input. This function guesses at whether to attempt to parse as binary or json first based on path's suffix.
Types ¶
This section is empty.