A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/sigs.k8s.io/kubebuilder/v4/pkg/plugin/util below:

util package - sigs.k8s.io/kubebuilder/v4/pkg/plugin/util - Go Packages

View Source
const (
	
	KubebuilderBinName = "kubebuilder"
)

This section is empty.

AppendCodeAtTheEnd appends the given code at the end of the file.

AppendCodeIfNotExist checks if the code does not already exist in the file, and if not, appends it to the end.

func CommentCode(filename, target, prefix string) error

CommentCode searches for target in the file and adds the comment prefix to the target content. The target content may span multiple lines.

GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.

HasFileContentWith check if given `text` can be found in file

InsertCode searches target content in the file and insert `toInsert` after the target.

func InsertCodeIfNotExist(filename, target, code string) error

InsertCodeIfNotExist insert code if it does not already exist

func ReplaceInFile(path, oldValue, newValue string) error

ReplaceInFile replaces all instances of old with new in the file at path.

func ReplaceRegexInFile(path, match, replace string) error

ReplaceRegexInFile finds all strings that match `match` and replaces them with `replace` in the file at path.

This function is currently unused in the Kubebuilder codebase, but is used by other projects and may be used in Kubebuilder in the future.

RunCmd prints the provided message and command and then executes it binding stdout and stderr

func UncommentCode(filename, target, prefix string) error

UncommentCode searches for target in the file and remove the comment prefix of the target content. The target content may span multiple lines.

YesNo reads from stdin looking for one of "y", "yes", "n", "no" and returns true for "y" and false for "n"

This section is empty.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4