Categorygithub.com/tych0/go-losetup
repositorypackage
0.0.0-20170407175016-fc9adea44124
Repository: https://github.com/tych0/go-losetup.git
Documentation: pkg.go.dev

# README

go-losetup

A losetup implementation for go-lang

how to get it

go get gopkg.in/freddierice/go-losetup.v1

example usage

// attach a raw file to a loop device
dev, err := losetup.Attach("rawfile.img", 0, false)
if err != nil {
	// error checking
}

fmt.Printf("attached rawfile.img to %v\n", dev.Path())

err := dev.Detach()
if err != nil {
	// error checking
}