Golang mtx library, forked from https://github.com/birkelund/mtx
Find a file
2025-12-05 23:11:42 +01:00
mock setup go module 2025-12-05 23:07:05 +01:00
scsi use debian binary location 2025-12-05 23:07:36 +01:00
.gitignore Initial commit 2016-05-18 15:37:39 +02:00
go.mod setup go module 2025-12-05 23:07:05 +01:00
go.sum setup go module 2025-12-05 23:07:05 +01:00
LICENSE Initial import. 2016-05-18 15:39:43 +02:00
mtx.go remove white space from volume tags 2025-12-05 23:07:58 +01:00
README.md Update README.md 2025-12-05 23:11:42 +01:00
slottype_string.go Initial import. 2016-05-18 15:39:43 +02:00

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