Categorygithub.com/freddierice/go-losetup/v2
modulepackage
2.0.1
Repository: https://github.com/freddierice/go-losetup.git
Documentation: pkg.go.dev

# README

go-losetup

A losetup implementation for go-lang.

how to get it

go get github.com/freddierice/go-losetup

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
}

# Functions

Attach attaches backingFile to the loopback device starting at offset.
GetFree searches for the first free loopback device.
New creates a reference to a specific loop device, if you know which one you want to reference.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
loop filter types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeviceFormatString holds the format of loopback devices.
No description provided by the author
No description provided by the author
No description provided by the author
loop flags.
No description provided by the author
No description provided by the author
No description provided by the author
paths.
No description provided by the author
No description provided by the author
general constants.
No description provided by the author
No description provided by the author
ioctl commands.
No description provided by the author
No description provided by the author

# Structs

Device represents a loop device /dev/loop#.
Info is a datastructure that holds relevant information about a file backed loopback device.