wit-bindgen
wit-bindgen copied to clipboard
go: make generated code more idiomatic
wit-bindgen-go was written by a Go novice (me) and could use some feedback from experienced Go developers regarding API idioms. Here are some examples of potential improvements:
- Make functions which return
result<T, E>in WIT return e.g.(T, *E)in Go and ensure that*Eimplements the standard GoErrorinterface - Implement
io.WriterforStreamWriter[u8]andio.ReaderforStreamReader[u8]
I'm sure others will have more ideas.