Documentation
¶
Overview ¶
@index CCG reference parser for cross-namespace annotation links.
Index ¶
Constants ¶
const Scheme = "ccg"
Variables ¶
This section is empty.
Functions ¶
func CommonSuffixDepth ¶
CommonSuffixDepth returns the number of matching slash-separated path segments counted from the end of both inputs. @intent provide one deterministic import-reference similarity score for graph lookup and ingest resolution.
Types ¶
type Ref ¶
type Ref struct {
Raw string `json:"raw"`
Namespace string `json:"namespace"`
Path string `json:"path,omitempty"`
Symbol string `json:"symbol,omitempty"`
Scope string `json:"scope"`
}
Ref is the structured form of a ccg:// annotation reference. @intent represent cross-namespace @see links without coupling annotations to graph storage.
func Parse ¶
Parse validates and normalizes a ccg:// reference. @intent decode ccg://{namespace}/{path}#{symbol} values used by @see annotations. @domainRule namespace is required and must be a single safe path segment. @domainRule path and symbol are optional; a path with no symbol represents a file or package path.