Documentation ¶
Overview ¶
Package raw implements raw access to Oyafiles, allowing for access without actually parsing the files. This allows for working with incorrect Oyafiles (e.g. with invalid imports) as long as they are well-formed YAML files.
Index ¶
Constants ¶
View Source
const DefaultName = "Oyafile"
View Source
const ValueFileExt = ".oya"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DecodedOyafile ¶
DecodedOyafile is an Oyafile that has been loaded from YAML but hasn't been parsed yet.
func (DecodedOyafile) Merge ¶
func (lhs DecodedOyafile) Merge(rhs DecodedOyafile) DecodedOyafile
type ErrNotRootOyafile ¶
type ErrNotRootOyafile struct {
Path string
}
func (ErrNotRootOyafile) Error ¶
func (e ErrNotRootOyafile) Error() string
type Oyafile ¶
type Oyafile struct { Path string // Path contains normalized absolute path to the Oyafile. Dir string // Dir contains normalized absolute path to the containing directory. RootDir string // RootDir is the absolute, normalized path to the project root directory. // contains filtered or unexported fields }
Oyafile represents an unparsed Oyafile.
func (*Oyafile) AddRequire ¶
AddRequire adds a Require: entry for the pack.
func (*Oyafile) Decode ¶
func (raw *Oyafile) Decode() (DecodedOyafile, error)
Notes ¶
Bugs ¶
This is slightly brittle because it will match any line that ends with the uri. It might be a good idea to add a raw.(*Oyafile).matchesWithin function along the lines of how insertBeforeWithin is written.
Use raw access.
Click to show internal directories.
Click to hide internal directories.