Merge pull request #676 from stevvooe/delete-image
cmd/dist, images: allow image delete
This commit is contained in:
commit
2cf8e5ac9d
4 changed files with 46 additions and 0 deletions
|
@ -103,6 +103,12 @@ func List(tx *bolt.Tx) ([]Image, error) {
|
|||
return images, nil
|
||||
}
|
||||
|
||||
func Delete(tx *bolt.Tx, name string) error {
|
||||
return withImagesBucket(tx, func(bkt *bolt.Bucket) error {
|
||||
return bkt.DeleteBucket([]byte(name))
|
||||
})
|
||||
}
|
||||
|
||||
func readImage(image *Image, bkt *bolt.Bucket) error {
|
||||
return bkt.ForEach(func(k, v []byte) error {
|
||||
if v == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue