Skip to content

Commit

Permalink
add randstr preprocessor to defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar committed Oct 20, 2023
1 parent 990cec0 commit fa9a091
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/templates/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func ParseTemplateFromReader(reader io.Reader, preprocessor Preprocessor, option
// persist verified status value and then
// expand all preprocessor and reparse template

// === signature verification befoer preprocessors ===
// === signature verification before preprocessors ===
template, err := parseTemplate(data, options)
if err != nil {
return nil, err
Expand Down
4 changes: 3 additions & 1 deletion pkg/templates/preprocessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ type Preprocessor interface {

var (
preprocessorRegex = regexp.MustCompile(`{{([a-z0-9_]+)}}`)
defaultPreprocessors = []Preprocessor{}
defaultPreprocessors = []Preprocessor{
&randStrPreprocessor{},
}
)

func getPreprocessors(preprocessor Preprocessor) []Preprocessor {
Expand Down

0 comments on commit fa9a091

Please sign in to comment.