Skip to content

Commit

Permalink
Add a Register function to allow functions to be added to the dispatc…
Browse files Browse the repository at this point in the history
…h table.
  • Loading branch information
jlewi committed Sep 21, 2023
1 parent dad172a commit 5d718ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/kustomize/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func isValidFnKind(category string) bool {
return valid
}

// RegisterFilter registers a function with the dispatcher
func RegisterFilter(kind string, fn func() kio.Filter) {
dispatchTable[kind] = fn
}

// SkipBadRead tries to read a file and returns true if there is an error,
// false otherwise. Used with kio.LocalPackageReader to skip yaml files that
// aren't parsable by kustomize.
Expand Down

0 comments on commit 5d718ae

Please sign in to comment.