Skip to content

[Feature request] Add an option to generate a GoString method #98

@theclapp

Description

@theclapp

kr/pretty wants a type to implement fmt.GoStringer, so I had to wrap enumer's String, e.g.

func (x MyType) GoString() string  { return x.String() }

It'd be nice if enumer could generate that for me. Obviously for any given type it's not that big a deal, but so far I have three.

Other libraries might want some other interface, so maybe the option could specify the method name, e.g. -otherString=GoString, which you could specify multiple times. Or it could accept a CSV.

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