Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
freddierice committed Apr 7, 2017
1 parent 467ac40 commit fc9adea
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
# go-losetup
A losetup implementation for go-lang

## how to get it
```
go get gopkg.in/freddierice/go-losetup.v1
```

## example usage
```go
// 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
}
```

0 comments on commit fc9adea

Please sign in to comment.