Skip to content

Commit

Permalink
Avoid spreading byte arrays (reconcilerio#23)
Browse files Browse the repository at this point in the history
Fixes reconcilerio#17

Signed-off-by: Scott Andrews <scott@andrews.me>
  • Loading branch information
scothis committed Jan 31, 2022
1 parent bbb0c6a commit cf75de9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apis/admissionregistration/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/apiextensions/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/apiregistration/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apis/certificates/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion diegen/die/gen.go
Expand Up @@ -109,7 +109,9 @@ func (d *Field) Default() {
d.Type = d.Type[i:]

// spread slices
d.TypePrefix = strings.Replace(d.TypePrefix, "[]", "...", 1)
if d.Type != "byte" {
d.TypePrefix = strings.Replace(d.TypePrefix, "[]", "...", 1)
}
}
if i := strings.LastIndex(d.Type, "."); i >= 0 {
d.TypePackage = d.Type[0:i]
Expand Down

0 comments on commit cf75de9

Please sign in to comment.