coopernurse / barrister-go

Barrister RPC bindings for the Go language
http://barrister.bitmechanic.com/
8 stars 4 forks source link

Fix generated enum type declarations #8

Closed simonsargeant closed 6 years ago

simonsargeant commented 6 years ago

The generated enums do not have the correct type. barrister-go generates constants of the form:

type MyString string
const (
    MyStringOneString MyString = "onestring"
    MyStringTwoString          = "twostring"
)

However only the first constant is of the correct type, as demonstrated in this playground. This PR adds a test case and declares the type on each line.

jvrplmlmn commented 6 years ago

@coopernurse any chance that you can take a look at this?