Skip to content

Commit a1684bd

Browse files
author
Dmitriy Matrenichev
committed
chore: speed up go generate for enumer
Enum generator github.com/dmarkham/enumer supports comma separated list of types. Use it and speed up this process by a LOT. Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
1 parent 4dd0aa7 commit a1684bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3624
-3946
lines changed

go.work

Lines changed: 0 additions & 11 deletions
This file was deleted.

pkg/imager/profile/diskformat_enumer.go

Lines changed: 0 additions & 102 deletions
This file was deleted.

pkg/imager/profile/outformat_enumer.go

Lines changed: 0 additions & 106 deletions
This file was deleted.

pkg/imager/profile/output.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ type ISOOptions struct {
4747
SDBootEnrollKeys SDBootEnrollKeys `yaml:"sdBootEnrollKeys"`
4848
}
4949

50-
//go:generate enumer -type=OutputKind -linecomment -text
51-
5250
// OutputKind is output specification.
5351
type OutputKind int
5452

@@ -64,8 +62,6 @@ const (
6462
OutKindCmdline // cmdline
6563
)
6664

67-
//go:generate enumer -type OutFormat -linecomment -text
68-
6965
// OutFormat is output format specification.
7066
type OutFormat int
7167

@@ -79,8 +75,6 @@ const (
7975
OutFormatZSTD // .zst
8076
)
8177

82-
//go:generate enumer -type DiskFormat -linecomment -text
83-
8478
// DiskFormat is disk format specification.
8579
type DiskFormat int
8680

@@ -93,8 +87,6 @@ const (
9387
DiskFormatOVA // ova
9488
)
9589

96-
//go:generate enumer -type SDBootEnrollKeys -linecomment -text
97-
9890
// SDBootEnrollKeys is a value in loader.conf secure-boot-enroll: off, manual, if-safe, force.
9991
type SDBootEnrollKeys int
10092

0 commit comments

Comments
 (0)