Skip to content

E0115: Malformed enum ​

An enum declaration is enum Name { A, B }, optionally with an underlying string or integer type and values (all of them or none), or with variants holding data (Circle{R float64}, no underlying type). Variant names start with a capital letter, are unique, and can't be a name every enum generates (Values, Parse…, String, Valid).

Wrong ​

vuka
enum Status { Draft, Sent, Draft }

enum Kind float64 { A, B }
vuka
enum Status { Draft, Sent, Archived }

enum Kind int { A, B }

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.