Documentation ¶
Index ¶
- Constants
- func CloseFileIgnore(file *os.File)
- func ExcludeTestFilter() filter.LoaderFilter
- func FindInput(file string, workspacePath string) (string, io.Reader)
- func FindManifestLocations(root string) ([]string, error)
- func IsSkipWalkDirectory(info files.DirEntry) bool
- func JSONRoundTrip(from any, to any) error
- func LoadRegalBundleFS(fs files.FS) (bundle.Bundle, error)
- func LoadRegalBundlePath(path string) (bundle.Bundle, error)
- func MustJSONRoundTrip(from any, to any)
- func MustLoadRegalBundleFS(fs files.FS) bundle.Bundle
- func ToMap(a any) map[string]any
- func WalkFiles(root string, f func(path string) error) error
Constants ¶
const PathSeparator = string(os.PathSeparator)
Variables ¶
This section is empty.
Functions ¶
func CloseFileIgnore ¶
CloseFileIgnore closes file ignoring errors, mainly for deferred cleanup.
func ExcludeTestFilter ¶
func ExcludeTestFilter() filter.LoaderFilter
func FindInput ¶ added in v0.26.0
FindInput finds input.json file in workspace closest to the file, and returns both the location and the reader.
func FindManifestLocations ¶ added in v0.26.0
FindManifestLocations walks the file system rooted at root, and returns the *relative* paths of directories containing a .manifest file.
func IsSkipWalkDirectory ¶ added in v0.26.0
func JSONRoundTrip ¶
JSONRoundTrip convert any value to JSON and back again.
func LoadRegalBundleFS ¶
LoadRegalBundleFS loads bundle embedded from policy and data directory.
func LoadRegalBundlePath ¶
LoadRegalBundlePath loads bundle from path.
func MustJSONRoundTrip ¶ added in v0.8.0
MustJSONRoundTrip convert any value to JSON and back again, exit on failure.
func MustLoadRegalBundleFS ¶
MustLoadRegalBundleFS loads bundle embedded from policy and data directory, exit on failure.
func WalkFiles ¶ added in v0.26.0
WalkFiles walks the file system rooted at root, calling f for each file. This is a less ceremonious version of filepath.WalkDir where only file paths (not dirs) are passed to the callback, and where directories that should commonly be ignored (.git, node_modules, etc.) are skipped.
Types ¶
This section is empty.