Documentation ¶
Overview ¶
Package kytheuri provides a type to represent Kythe URIs. This package supports parsing a Kythe URI from a string, and converting back and forth between a Kythe URI and a Kythe VName protobuf message.
Index ¶
Constants ¶
const Scheme = "kythe:"
Scheme is the URI scheme label for Kythe.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
Equal reports whether the two Kythe URI strings are equal in canonical form. If either URI is invalid, Equal returns false.
Types ¶
type Raw ¶ added in v0.0.27
type Raw struct{ URI URI }
A Raw represents a parsed, "raw" Kythe URI whose field values are escaped. Use the Decode method to convert a *Raw to a plain *URI.
func ParseRaw ¶ added in v0.0.27
ParseRaw parses a Kythe URI from s, but does not unescape its fields. Use Parse to fully parse and unescape a URI, or call the Decode method of the returned value.
func (*Raw) Decode ¶ added in v0.0.27
Decode returns a *URI equivalent to r but with its field values unescaped.
func (*Raw) String ¶ added in v0.0.27
String renders r into the standard URI string format.
The resulting string is in canonical ordering, so if the URI was created by parsing a string, this may return a different string from that. However, parsing this string will always give back the same URI. If r == nil, it is treated as an empty URI.
type URI ¶
A URI represents a parsed, unescaped Kythe URI. A zero-valued URI is ready for use, representing the empty URI.
func Parse ¶
Parse parses and unescapes a Kythe URI from s. If s omits a scheme label, the "kythe" scheme is assumed.
func (*URI) String ¶
String renders the Kythe URI into the standard URI string format.
The resulting string is in canonical ordering, so if the URI was created by parsing a string, this may return a different string from that. However, parsing this string will always give back the same URI. If u == nil, it is treated as an empty URI.