@@ -67,7 +67,7 @@ const (
67
67
queryParamArraySize = 2
68
68
)
69
69
70
- // nolint:funlen,gocognit,gocyclo // It's a generator, it's supposed to be long, and we won't expand it.
70
+ //nolint:funlen,gocognit,gocyclo // It's a generator, it's supposed to be long, and we won't expand it.
71
71
func exec () error {
72
72
cfg := new (envConfig )
73
73
@@ -422,15 +422,14 @@ func exec() error {
422
422
for _ , k := range sortedKeys (scope ) {
423
423
v := scope [k ]
424
424
err = writeStruct (file , v )
425
-
426
425
if err != nil {
427
426
return err
428
427
}
429
428
}
430
429
431
430
dirPath := filepath .Join (cfg .HandlerDir , fileName )
432
431
433
- err = os .MkdirAll (dirPath , os . ModePerm )
432
+ err = os .MkdirAll (dirPath , dirMode )
434
433
if err != nil {
435
434
return err
436
435
}
@@ -463,9 +462,8 @@ func exec() error {
463
462
// reMakesSense sometimes there are invalid enums, for instance just a comma ","
464
463
var reMakesSense = regexp .MustCompile (`\w` )
465
464
466
- // nolint:funlen // It's a generator, it's supposed to be long, and we won't expand it.
465
+ //nolint:funlen // It's a generator, it's supposed to be long, and we won't expand it.
467
466
func writeStruct (f * jen.File , s * Schema ) error {
468
- // nolint:nestif // It's a generator, it's supposed to be long, and we won't expand it.
469
467
if s .isEnum () {
470
468
kind := getScalarType (s )
471
469
o := f .Type ().Id (s .CamelName )
@@ -563,7 +561,8 @@ func toSingle(src string) string {
563
561
564
562
const (
565
563
yamlTabSize = 2
566
- writeMode = os .FileMode (0644 )
564
+ writeMode = os .FileMode (0o644 )
565
+ dirMode = os .FileMode (0o750 )
567
566
)
568
567
569
568
// readConfig reads and formats the config
0 commit comments