mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 01:44:43 +01:00
make go vet happy
This commit is contained in:
parent
52f0c0c33b
commit
adab06405b
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user