We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d67388 commit b952b9bCopy full SHA for b952b9b
pkg/plugins/golang/v4/scaffolds/api.go
@@ -17,6 +17,7 @@ limitations under the License.
17
package scaffolds
18
19
import (
20
+ "errors"
21
"fmt"
22
23
"github.com/spf13/afero"
@@ -67,7 +68,11 @@ func (s *apiScaffolder) Scaffold() error {
67
68
// Load the boilerplate
69
boilerplate, err := afero.ReadFile(s.fs.FS, hack.DefaultBoilerplatePath)
70
if err != nil {
- boilerplate = []byte("")
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
+ }
76
}
77
78
// Initialize the machinery.Scaffold that will write the files to disk
0 commit comments