File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
cmd/pluginator/internal/builtinplugin Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ $(pGen)/%.go: $(MYGOBIN)/pluginator $(MYGOBIN)/goimports
89
89
$(MYGOBIN ) /goimports -w $* .go \
90
90
)
91
91
92
- # Target is for debugging.
92
+ # Generate builtin plugins
93
93
.PHONY : generate-kustomize-builtin-plugins
94
94
generate-kustomize-builtin-plugins : $(builtplugins )
95
95
for plugin in $( abspath $( wildcard $( pSrc) /* ) ) ; do \
@@ -101,7 +101,7 @@ generate-kustomize-builtin-plugins: $(builtplugins)
101
101
cd ../../../; \
102
102
make no-diff \
103
103
104
- # Check for diff, if diff is found, throw error code 1 (subject to change based on discussion)
104
+ # Check for diff, if diff is found, throw error code 1
105
105
.PHONY : no-diff
106
106
no-diff : $(builtplugins )
107
107
for file in $( abspath $( builtinplugins) ) ; do \
Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ func ConvertToBuiltInPlugin() (retErr error) {
62
62
w .write (
63
63
fmt .Sprintf (
64
64
"// pluginator %s\n " , provenance .GetProvenance ().Short ()))
65
- w .write ("\n " )
66
65
w .write ("package " + packageForGeneratedCode )
67
66
68
67
pType := unknown
@@ -73,6 +72,8 @@ func ConvertToBuiltInPlugin() (retErr error) {
73
72
continue
74
73
}
75
74
if strings .HasPrefix (l , "var " + konfig .PluginSymbol + " plugin" ) {
75
+ // Hack to skip leading new line
76
+ scanner .Scan ()
76
77
continue
77
78
}
78
79
if strings .Contains (l , " Transform(" ) {
@@ -93,7 +94,7 @@ func ConvertToBuiltInPlugin() (retErr error) {
93
94
}
94
95
w .write ("" )
95
96
w .write ("func New" + root + "Plugin() resmap." + pType .String () + "Plugin {" )
96
- w .write (" return &" + root + "Plugin{}" )
97
+ w .write (" return &" + root + "Plugin{}" )
97
98
w .write ("}" )
98
99
99
100
return nil
You can’t perform that action at this time.
0 commit comments