Documentation ¶
Overview ¶
Package project defines concepts that are related to a Terramate project.
Index ¶
- Constants
- func AbsPath(root, prjAbsPath string) string
- func FriendlyFmtDir(root, wd, dir string) (string, bool)
- type Path
- func (p Path) Dir() Path
- func (p Path) HasDirPrefix(s string) bool
- func (p Path) HasPrefix(s string) bool
- func (p Path) HostPath(rootdir string) string
- func (p Path) Join(pathstr string) Path
- func (p Path) MarshalJSON() ([]byte, error)
- func (p Path) String() string
- func (p *Path) UnmarshalJSON(data []byte) error
- type Paths
- type Runtime
Constants ¶
const MaxGlobalLabels = 256
MaxGlobalLabels allowed to be used in a globals block. TODO(i4k): get rid of this limit.
Variables ¶
This section is empty.
Functions ¶
func AbsPath ¶
AbsPath takes the root project dir and a project's absolute path prjAbsPath and returns an absolute path to the file system.
func FriendlyFmtDir ¶
FriendlyFmtDir formats the directory in a friendly way for tooling output.
Types ¶
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
Path is a project path. The project paths are always absolute forward slashed paths with no lexical processing left, which means they must be cleaned paths. See:
https://pkg.go.dev/path#Clean
The project path has / as root.
func PrjAbsPath ¶
PrjAbsPath converts the file system absolute path absdir into an absolute project path on the form /path/on/project relative to the given root.
func (Path) HasDirPrefix ¶ added in v0.4.4
HasDirPrefix tests whether p begins with a directory prefix s.
func (Path) Join ¶
Join joins the pathstr path into p. See path.Join for the underlying implementation.
func (Path) MarshalJSON ¶ added in v0.4.1
MarshalJSON implements the json.Marshaler interface
func (*Path) UnmarshalJSON ¶ added in v0.4.1
UnmarshalJSON implements the json.Unmarshaler interface.