feat(refacto): move everything in internal package
This allows to install katenary with `go install` and to clean up the project folder.
This commit is contained in:
20
internal/generator/helper.go
Normal file
20
internal/generator/helper.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package generator
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"github.com/katenary/katenary/internal/generator/labels"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// helmHelper is a template for the _helpers.tpl file in the chart templates directory.
|
||||
//
|
||||
//go:embed helmHelper.tpl
|
||||
var helmHelper string
|
||||
|
||||
// Helper returns the _helpers.tpl file for a chart.
|
||||
func Helper(name string) string {
|
||||
helmHelper := strings.ReplaceAll(helmHelper, "__APP__", name)
|
||||
helmHelper = strings.ReplaceAll(helmHelper, "__PREFIX__", labels.KatenaryLabelPrefix)
|
||||
helmHelper = strings.ReplaceAll(helmHelper, "__VERSION__", "0.1.0")
|
||||
return helmHelper
|
||||
}
|
Reference in New Issue
Block a user