package bar import ( "log" "os/exec" "github.com/hypebeast/go-osc/osc" ) // Your Amiga host! type Amiga struct { host string } // Reboots your Amiga hardware typically by shorting reset lines on a Gayle // chip. func (amiga *Amiga) reset(msg *osc.Message) { log.Print("Amiga reset triggered at ", amiga.host) } // Inserts disk to a machine's df0 floppy drive. // Typically used to mount adf disk images remotely // to a flashfloppy emulated drive. func (amiga *Amiga) insertDisk(msg *osc.Message) { filename := getOSC[string](msg) // Find executable name := "flop" path, err := exec.LookPath(name) if err != nil { log.Printf("can't find '%s'\n", name) return } // run flop command exec.Command(path, filename).Run() }