Skip to content

feature request: add -trimtype option to remove prefixes that match the name of the type #117

@abemedia

Description

@abemedia

It's quite common to have enums that are prefixed with the type e.g.

type Pill int

const (
	PillPlacebo Pill = iota
	PillAspirin
	PillIbuprofen
	PillParacetamol
)

It would be great to have a flag like -trimtype that will trim the type from the value automatically, rather than having to have a long list of prefixes inside -trimprefix.

I'd be happy to implement this if it's accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions