joyent / kosh

Second-generation shell for accessing the Conch API
Mozilla Public License 2.0
2 stars 5 forks source link

Support setting device asset tags to null #7

Open sungo opened 5 years ago

sungo commented 5 years ago

See https://github.com/joyent/conch/pull/670

sungo commented 5 years ago

This is a bigger ask than it really should be. Because this is go in 2019, we use structs without pointers. As such, there is no way to pass a null, only a value or the zero value. To make this happen, we have to, for at least this struct, use pointers to signal the json marshaller to send a null. Might be able to do this only when we send the payload up.