Documentation ¶
Index ¶
- func Clean(pkg string) (string, error)
- func Dir(pkg string) string
- func Join(elem ...string) (string, error)
- func Parent(pkg string) string
- func Split(pkg string) []string
- type Label
- func (l *Label) Attr(name string) (starlark.Value, error)
- func (l *Label) AttrNames() []string
- func (l *Label) CompareSameType(op syntax.Token, y starlark.Value, depth int) (bool, error)
- func (l *Label) Freeze()
- func (l *Label) Hash() (uint32, error)
- func (l *Label) IsAbs() bool
- func (l *Label) MarshalText() ([]byte, error)
- func (l *Label) RelativeTo(pkg string) (*Label, error)
- func (l *Label) String() string
- func (l *Label) Truth() starlark.Bool
- func (l *Label) Type() string
- func (l *Label) UnmarshalText(text []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clean ¶
Clean returns the shortest pkg name equivalent to pkg and checks the pkg path for errors. It replaces multiple slashes with a single slash and rejects pkg paths that contain colons, '..' or '.' elements.
Types ¶
type Label ¶
A Label represents a parsed label.
The general form represented is:
[kind:][[module[+version]@][//]package][:name]
If the package is omitted and the name is present, the label is relative to the current package.
func (*Label) CompareSameType ¶ added in v0.1.1
starlark.Comparable
func (*Label) MarshalText ¶
func (*Label) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.