diff --git a/config/config.go b/config/config.go index 03fb662..32b3b4d 100644 --- a/config/config.go +++ b/config/config.go @@ -230,7 +230,7 @@ type LoggingOutletCommon struct { type StdoutLoggingOutlet struct { LoggingOutletCommon `yaml:",inline"` Time bool `yaml:"time,default=true"` - Color bool `yaml:"color,default=true""` + Color bool `yaml:"color,default=true"` } type SyslogLoggingOutlet struct { @@ -289,12 +289,12 @@ func enumUnmarshal(u func(interface{}, bool) error, types map[string]interface{} return nil, err } if in.Type == "" { - return nil, &yaml.TypeError{[]string{"must specify type"}} + return nil, &yaml.TypeError{Errors: []string{"must specify type"}} } v, ok := types[in.Type] if !ok { - return nil, &yaml.TypeError{[]string{fmt.Sprintf("invalid type name %q", in.Type)}} + return nil, &yaml.TypeError{Errors: []string{fmt.Sprintf("invalid type name %q", in.Type)}} } if err := u(v, false); err != nil { return nil, err diff --git a/daemon/connecter/connecter.go b/daemon/connecter/connecter.go index c26d1de..4708cb3 100644 --- a/daemon/connecter/connecter.go +++ b/daemon/connecter/connecter.go @@ -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 } diff --git a/daemon/pruner/pruner.go b/daemon/pruner/pruner.go index 2b49c76..f8e3ab2 100644 --- a/daemon/pruner/pruner.go +++ b/daemon/pruner/pruner.go @@ -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