jcelliott/turnpike

Add 'omitempty' to args and kwargs

Closed this issue · 1 comments

Perhaps optional fields can have a wamp tag:

type Call struct {
    Request ID
    Options map[string]interface{}
    Procedure URI
    Arguments []interface{} `wamp:"omitempty"`
    ArgumentsKw map[string]interface{} `wamp:"omitempty"`
}

Fields will be traversed backwards looking for omitempty, and those that are nil or 0-length are omitted.