make go vet happy

This commit is contained in:
Christian Schwarz
2018-09-04 17:25:10 -07:00
parent 52f0c0c33b
commit adab06405b
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ func FromConfig(g *config.Global, in config.ConnectEnum) (*ClientFactory, error)
return nil, errRPC
}
config := streamrpc.ClientConfig{connConf}
config := streamrpc.ClientConfig{ConnConfig: connConf}
if err := config.Validate(); err != nil {
return nil, err
}
+5 -5
View File
@@ -61,8 +61,8 @@ type Pruner struct {
err error
// State Exec
prunePending []fs
pruneCompleted []fs
prunePending []*fs
pruneCompleted []*fs
}
type PrunerFactory struct {
@@ -253,14 +253,14 @@ func statePlan(a *args, u updater) state {
return onErr(u, err)
}
pfss := make([]fs, len(tfss))
pfss := make([]*fs, len(tfss))
for i, tfs := range tfss {
tfsvs, err := target.ListFilesystemVersions(ctx, tfs.Path)
if err != nil {
return onErr(u, err)
}
pfs := fs{
pfs := &fs{
path: tfs.Path,
snaps: make([]pruning.Snapshot, 0, len(tfsvs)),
}
@@ -321,7 +321,7 @@ func statePlan(a *args, u updater) state {
func stateExec(a *args, u updater) state {
var pfs fs
var pfs *fs
state := u(func(pruner *Pruner) {
if len(pruner.prunePending) == 0 {
pruner.state = Done