Improve builtin generation rules.

This commit is contained in:
Jeffrey Regan
2019-11-21 11:48:49 -08:00
parent e5382c59a2
commit 248d0d57d6
18 changed files with 109 additions and 40 deletions

View File

@@ -119,15 +119,13 @@ func NewWriter(r string) *writer {
return &writer{root: r, f: f}
}
// Assmue that this command is running with a $PWD of
// Assume that this command is running with a $PWD of
// $HOME/kustomize/plugin/builtin/secretgenerator
// (for example). Then we want to write to
// $HOME/kustomize/api/builtins
func makeOutputFileName(root string) string {
return filepath.Join(
"..", "..", "..",
"api", packageForGeneratedCode,
strings.ToLower(root)+".go")
"..", "..", "..", "api", packageForGeneratedCode, root+".go")
}
func (w *writer) close() {