Skip to content

Improve ENUM collection #10

Open
@VojtechVitek

Description

@VojtechVitek

Can we simplify ENUM collection? Instead of defining the gospeak.Enum[uint8] type with a special name = value comments above it..

It'd be great if gospeak could collect iotas directly and webrpc only generated String()/FromString()/MarshalText()/UnmarshalText() methods.

type Sentiment gospeak.Enum[uint8]

const (
	SentimentUnknown  Sentiment = 0 // "unknown"
	SentimentPositive Sentiment = 1 // "positive"
	SentimentNegative Sentiment = 2 // "negative"
	SentimentNeutral  Sentiment = 3 // "neutral"
	SentimentMixed    Sentiment = 4 // "mixed"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions