Find[In|Out]Port Panics when port not found
FindInPort and FindOutPort defers closing the port before checking the error, and will panic if the port was not found by calling .Close() on a nil pointer. Moving the defer to after the error check should fix this.
Specifically rtmididrv, I have not checked others. (after updating, I noticed this is in v2/port.go, and thus would affect all drivers.)
Edited by Brian Stark