search

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PathDelimiter = "."

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchReplace

type SearchReplace struct {
	// ByValue is the value of the field to be matched
	ByValue string

	// ByValueRegex is the value regex of the field to be matched
	ByValueRegex string

	// ByPath is the path of the field to be matched
	ByPath string

	// Count is the number of matches
	Count int

	// Match is the map of file path to list of matched fields
	Match map[string][]string

	// PutLiteral is the literal to be put at to field
	// filtered by path and/or value
	PutLiteral string

	// PutPattern is the setters reference comment to be added at to field
	PutPattern string

	PackagePath string
	// contains filtered or unexported fields
}

SearchReplace struct holds the input parameters and results for Search and Replace operations on resource configs

func (*SearchReplace) Filter

func (sr *SearchReplace) Filter(object *yaml.RNode) (*yaml.RNode, error)

Filter parses input node and performs search and replace operation on the node

func (*SearchReplace) Perform

func (sr *SearchReplace) Perform(resourcesPath string) error

Perform performs the search and replace operation on each node in the package path

Jump to

Keyboard shortcuts

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