Skip to content

Commit

Permalink
chore(feature): removes unused tmpl func (opendatahub-io#1105)
Browse files Browse the repository at this point in the history
ReplaceChar is not used anywhere in the templates, so there is no point
in keeping it around.

Most likely spill over from infamous opendatahub-io#605.

(cherry picked from commit 0c363cf)
  • Loading branch information
bartoszmajsak authored and VaishnaviHire committed Jul 24, 2024
1 parent bd75767 commit 8259e18
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion pkg/feature/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func (t *templateManifest) Process(data any) ([]*unstructured.Unstructured, erro

tmpl, parseErr := template.New(t.name).
Option("missingkey=error").
Funcs(template.FuncMap{"ReplaceChar": ReplaceChar}).
Parse(string(content))
if parseErr != nil {
return nil, fmt.Errorf("failed to parse template %s: %w", t.path, parseErr)
Expand Down
6 changes: 0 additions & 6 deletions pkg/feature/types.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package feature

import (
"strings"

featurev1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/features/v1"
infrav1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/infrastructure/v1"
)
Expand All @@ -28,7 +26,3 @@ type OAuth struct {
ClientSecret,
Hmac string
}

func ReplaceChar(s string, oldChar, newChar string) string {
return strings.ReplaceAll(s, oldChar, newChar)
}

0 comments on commit 8259e18

Please sign in to comment.