IMPROVED:
* Removed *BROKEN* dep. lrn2fixurshitk
This commit is contained in:
brent saner
2024-11-07 04:15:45 -05:00
parent 9dbc3a00fe
commit 70a88ca8b4
21 changed files with 430 additions and 166 deletions

View File

@@ -6,6 +6,7 @@ import (
`strings`
`honnef.co/go/augeas`
`r00t2.io/goutils/bitmask`
)
/*
@@ -41,12 +42,17 @@ func NewAugerFromAugeas(orig augeas.Augeas) (aug *Aug) {
}
/*
AugpathToFspath returns the filesystem path from an Augeas path.
AugpathToFspath returns the filesystem path (i.e. an existing file) from an Augeas path.
It is *required* and expected that the Augeas standard /files prefix be removed first;
if not, it is assumed to be part of the filesystem path.
If a valid path cannot be determined, fsPath will be empty.
To be clear, a file must exist for fsPath to not be empty;
the way AugpathToFsPath works is it recurses bottom-up a
given path and checks for the existence of a file,
continuing upwards if not found.
*/
func AugpathToFspath(augPath string) (fsPath string, err error) {
@@ -95,3 +101,11 @@ func dedupePaths(new, existing []string) (missing []string) {
return
}
// getInclPaths applies path options to inclusions.
func getInclPaths(pathSpec string, inclFlags *bitmask.MaskBit) (fpaths []string, err error) {
// TODO
return
}