File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
pkg/plugins/golang/v4/scaffolds Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ limitations under the License.
17
17
package scaffolds
18
18
19
19
import (
20
+ "errors"
20
21
"fmt"
21
22
22
23
"github.com/spf13/afero"
@@ -67,7 +68,11 @@ func (s *apiScaffolder) Scaffold() error {
67
68
// Load the boilerplate
68
69
boilerplate , err := afero .ReadFile (s .fs .FS , hack .DefaultBoilerplatePath )
69
70
if err != nil {
70
- return fmt .Errorf ("error scaffolding API/controller: unable to load boilerplate: %w" , err )
71
+ if errors .Is (err , afero .ErrFileNotFound ) {
72
+ boilerplate = []byte ("" )
73
+ } else {
74
+ return fmt .Errorf ("error scaffolding API/controller: unable to load boilerplate: %w" , err )
75
+ }
71
76
}
72
77
73
78
// Initialize the machinery.Scaffold that will write the files to disk
You can’t perform that action at this time.
0 commit comments