Golang mtx library, forked from https://github.com/birkelund/mtx
| mock | ||
| scsi | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| mtx.go | ||
| README.md | ||
| slottype_string.go | ||
mtx
Package mtx provides functions for working with an automated library changer.
YMMV.
Example usage
This shows how to use the mock changer.
package main
import (
"fmt"
"log"
"https://git.soontm.de/speatzle/mtx"
"https://git.soontm.de/speatzle/mtx/mock"
)
func main() {
mtx := mtx.NewChanger(mock.New(8, 32, 4, 16))
status, err := mtx.Do("status")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s", status)
if err := mtx.Load(1, 0); err != nil {
log.Fatal(err)
}
}
For an actual changer use the scsi sub package git.soontm.de/speatzle/mtx/scsi