Documentation ¶
Index ¶
- func CopyPackage(src, dst string, copyRootKptfile bool, matcher pkg.SubpackageMatcher) error
- func Exists(path string) (bool, error)
- func FindSubpackagesForPaths(matcher pkg.SubpackageMatcher, recurse bool, pkgPaths ...string) ([]string, error)
- func FormatPackage(pkgPath string)
- func RemovePackageContent(path string, removeRootKptfile bool) error
- func RootPkgFirstSorter(paths []string) func(i, j int) bool
- func RoundTripKptfilesInPkg(pkgPath string) error
- func SubPkgFirstSorter(paths []string) func(i, j int) bool
- func WalkPackage(src string, c func(string, os.FileInfo, error) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyPackage ¶
func CopyPackage(src, dst string, copyRootKptfile bool, matcher pkg.SubpackageMatcher) error
CopyPackage copies the content of a single package from src to dst. If includeSubpackages is true, it will copy resources belonging to any subpackages.
func Exists ¶
Exists returns true if a file or directory exists on the provided path, and false otherwise.
func FindSubpackagesForPaths ¶
func FindSubpackagesForPaths(matcher pkg.SubpackageMatcher, recurse bool, pkgPaths ...string) ([]string, error)
FindSubpackagesForPaths traverses the provided package paths and finds all subpackages using the provided pkgLocatorFunc
func FormatPackage ¶
func FormatPackage(pkgPath string)
FormatPackage formats resources and meta-resources in the package and all its subpackages
func RemovePackageContent ¶
func RootPkgFirstSorter ¶
RootPkgFirstSorter returns a "less" function that can be used with the sort.Slice function to correctly sort package paths so parent packages are always before subpackages.
func RoundTripKptfilesInPkg ¶
RoundTripKptfilesInPkg reads and writes all Kptfiles in the package including subpackages. This is used to format Kptfiles in the order of go structures TODO: phanimarupaka remove this method after addressing https://github.com/GoogleContainerTools/kpt/issues/2052
func SubPkgFirstSorter ¶
SubPkgFirstSorter returns a "less" function that can be used with the sort.Slice function to correctly sort package paths so subpackages are always before parent packages.
Types ¶
This section is empty.