Skip to content

Conversation

SoMuchForSubtlety
Copy link

This partly addresses #17 by generating const declarations for enums. I also fixed some linter errors.

Maybe we should omit numerical enums since they don't have useful names?

// May be one of 0.9, 0.333333333, 0.0
type FloatType float64

const (
	FloatType_0_9         FloatType = 0.9
	FloatType_0_333333333 FloatType = 0.333333333
	FloatType_0_0         FloatType = 0.0
)

// May be one of 1, 2, 3
type IntType int

const (
	IntType_1 IntType = 1
	IntType_2 IntType = 2
	IntType_3 IntType = 3
)

It would probably also make sense to gate this behind a config flag, what do you think?

@TAR5
Copy link

TAR5 commented Aug 14, 2023

Great feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants