Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions enumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ func %[1]sValues() []%[1]s {
// [1]: type name
const stringsMethod = `// %[1]sStrings returns a slice of all String values of the enum
func %[1]sStrings() []string {
strs := make([]string, len(_%[1]sNames))
copy(strs, _%[1]sNames)
return strs
return slices.Clone(_%[1]sNames)
}
`

Expand Down