Skip to content

Generate enum name that matches with protobuf's naming convension #247

@ghazninattarshah

Description

@ghazninattarshah
type Employee int 
const (
    UnknownEmployee Employee = iota
    Phone
)

type Contact int
const (
    UnknownContact Contact = iota
    Phone
)

Having the above gunk definitions on same package fails, because Phone is redeclared as per gunk (as it follows golang syntax)

This can overcome this by adding prefix to phone on both enums, like EmployeePhone and ContactPhone, but after genrating protoc bindings, the names would look like double prefixed Employee_EmployeePhone.

Add support to define a enum name through gunk annotation or some how to match the proto's naming convension.

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