Documentation ¶
Overview ¶
Package govname supports the creation of VName protobuf messages for Go packages and other entities.
Index ¶
Constants ¶
View Source
const Language = "go"
Language is the language string to use for Go VNames.
Variables ¶
View Source
var VCSRules = vnameutil.Rules{{ regexp.MustCompile(`^(?i)(?P<corpus>code\.google\.com/p/[-a-z0-9]+)(?:\.(?P<subrepo>\w+))?` + pathTail), &spb.VName{Corpus: "${corpus}", Signature: packageSig, Root: "${subrepo}"}, }, { regexp.MustCompile(`^(?i)(?P<corpus>[-._a-z0-9]+\.googlecode\.com)` + pathTail), &spb.VName{Corpus: "${corpus}", Signature: packageSig}, }, { regexp.MustCompile(`^(?P<corpus>github\.com/(?:[-.\w]+){2})` + pathTail), &spb.VName{Corpus: "${corpus}", Signature: packageSig}, }, { regexp.MustCompile(`^(?P<corpus>bitbucket\.org(?:/[-.\w]+){2})` + pathTail), &spb.VName{Corpus: "${corpus}", Signature: packageSig}, }, { regexp.MustCompile(`^(?P<corpus>launchpad\.net/(?:[-.\w]+|~[-.\w]+/[-.\w]+))` + pathTail), &spb.VName{Corpus: "${corpus}", Signature: packageSig}, }, { regexp.MustCompile(`(?P<corpus>golang\.org(?:/x/\w+))` + pathTail), &spb.VName{Corpus: "${corpus}", Signature: packageSig}, }, }
VCSRules defines rewriting rules for Go import paths, using rules loosely borrowed from $GOROOT/src/cmd/go/vcs.go. These rules are used to extract corpus and root information from an import path.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.