utils

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(paths ...string) bool

FileExists checks if a file or directory exists at the given path.

func FindFileDown

func FindFileDown(startDir, fileName string) (string, bool)

FindFileDown searches for a file named fileName starting from startDir and it's subdirectories. Returns the full path to the file and true if found, otherwise returns an empty string and false.

func Grep

func Grep(fileName string, re *regexp.Regexp) (string, error)

Grep searches fileName for the first match of the provided regular expression and returns the matched content (full match followed by any capture groups).

func Sed

func Sed(fileName string, re *regexp.Regexp, replace string) error

Sed performs a search-and-replace operation on the specified file using the provided regular expression and replacement string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL