Documentation
¶
Index ¶
- func Copy(src, dst string) error
- func Create(path string, newContent []byte) error
- func Exists(path string) bool
- func ListDirs(path string) ([]string, error)
- func LoadYAML(path string, v any) error
- func Read(path string) ([]byte, error)
- func ReadString(path string) (string, error)
- func Search(rootPath, fileName string, opts ...SearchOption) ([]string, error)
- type SearchOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy copies a file from the source path to the destination path, preserving the file mode of the source file. It expands environment variables in the provided source and destination paths before processing. If the destination directory does not exist, it creates the directory structure.
func Create ¶
Create creates a file at the specified path with the given content. It expands environment variables in the path and ensures the parent directory exists.
func LoadYAML ¶
LoadYAML reads a YAML file from the given path and unmarshals its content into the provided variable `v`.
func ReadString ¶
Types ¶
type SearchOption ¶
type SearchOption func(*searchOptions)
func WithOmit ¶
func WithOmit(omit ...string) SearchOption
Click to show internal directories.
Click to hide internal directories.