guelfey / go.dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
124 stars 42 forks source link

Make struct-exports customizable #21

Closed Merovius closed 11 years ago

Merovius commented 11 years ago

Instead of just using the dbus-tag to omit struct-values from being exported, it could be used (like in encoding/json) to specify the name to export.

guelfey commented 11 years ago

Struct fields in dbus have no names; structs are just an ordered collection of values, so a tag specifying a field name doesn't make any sense. One could possilby use tags to change the order of the fields, but as you can just rearrange the struct fields in the source code and I can't think of any other package or part of the language that is sensitive to the order of struct fields, I see no need to implement it.