mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
update go-zfs to last version
Signed-off-by: Alexey Guskov <lexag@mail.ru>
This commit is contained in:
parent
7f6a7973cd
commit
ea5ce27564
6 changed files with 17 additions and 9 deletions
|
@ -49,7 +49,7 @@ clone git github.com/go-check/check 64131543e7896d5bcc6bd5a76287eb75ea96c673
|
|||
clone git github.com/gorilla/context 14f550f51a
|
||||
clone git github.com/gorilla/mux e444e69cbd
|
||||
clone git github.com/kr/pty 5cf931ef8f
|
||||
clone git github.com/mistifyio/go-zfs v2.1.0
|
||||
clone git github.com/mistifyio/go-zfs v2.1.1
|
||||
clone git github.com/tchap/go-patricia v2.1.0
|
||||
clone hg code.google.com/p/go.net 84a4013f96e0
|
||||
clone hg code.google.com/p/gosqlite 74691fb6f837
|
||||
|
|
|
@ -47,5 +47,14 @@ Push your feature branch to your fork.
|
|||
|
||||
**Important:** By submitting a patch, you agree to allow the project owners to license your work under the [Apache 2.0 License](./LICENSE).
|
||||
|
||||
### Go Tools ###
|
||||
For consistency and to catch minor issues for all of go code, please run the following:
|
||||
* goimports
|
||||
* go vet
|
||||
* golint
|
||||
* errcheck
|
||||
|
||||
Many editors can execute the above on save.
|
||||
|
||||
----
|
||||
Guidelines based on http://azkaban.github.io/contributing.html
|
||||
|
|
|
@ -264,7 +264,7 @@ func parseInodeChanges(lines [][]string) ([]*InodeChange, error) {
|
|||
}
|
||||
|
||||
func listByType(t, filter string) ([]*Dataset, error) {
|
||||
args := []string{"get", "all", "-t", t, "-rHp"}
|
||||
args := []string{"get", "-rHp", "-t", t, "all"}
|
||||
if filter != "" {
|
||||
args = append(args, filter)
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ func Volumes(filter string) ([]*Dataset, error) {
|
|||
// GetDataset retrieves a single ZFS dataset by name. This dataset could be
|
||||
// any valid ZFS dataset type, such as a clone, filesystem, snapshot, or volume.
|
||||
func GetDataset(name string) (*Dataset, error) {
|
||||
out, err := zfs("get", "all", "-Hp", name)
|
||||
out, err := zfs("get", "-Hp", "all", name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ func (d *Dataset) Rollback(destroyMoreRecent bool) error {
|
|||
// A recursion depth may be specified, or a depth of 0 allows unlimited
|
||||
// recursion.
|
||||
func (d *Dataset) Children(depth uint64) ([]*Dataset, error) {
|
||||
args := []string{"get", "all", "-t", "all", "-Hp"}
|
||||
args := []string{"get", "-t", "all", "-Hp", "all"}
|
||||
if depth > 0 {
|
||||
args = append(args, "-d")
|
||||
args = append(args, strconv.FormatUint(depth, 10))
|
||||
|
|
|
@ -262,8 +262,10 @@ func TestChildren(t *testing.T) {
|
|||
|
||||
func TestListZpool(t *testing.T) {
|
||||
zpoolTest(t, func() {
|
||||
_, err := zfs.ListZpools()
|
||||
pools, err := zfs.ListZpools()
|
||||
ok(t, err)
|
||||
equals(t, "test", pools[0].Name)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -292,7 +294,7 @@ func TestRollback(t *testing.T) {
|
|||
ok(t, err)
|
||||
|
||||
err = s1.Rollback(false)
|
||||
assert(t, ok != nil, "should error when rolling back beyond most recent without destroyMoreRecent = true")
|
||||
assert(t, err != nil, "should error when rolling back beyond most recent without destroyMoreRecent = true")
|
||||
|
||||
err = s1.Rollback(true)
|
||||
ok(t, err)
|
||||
|
|
|
@ -92,9 +92,6 @@ func ListZpools() ([]*Zpool, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// there is no -H
|
||||
out = out[1:]
|
||||
|
||||
var pools []*Zpool
|
||||
|
||||
for _, line := range out {
|
||||
|
|
Loading…
Reference in a new issue