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 {
|
type StdoutLoggingOutlet struct {
|
||||||
LoggingOutletCommon `yaml:",inline"`
|
LoggingOutletCommon `yaml:",inline"`
|
||||||
Time bool `yaml:"time,default=true"`
|
Time bool `yaml:"time,default=true"`
|
||||||
Color bool `yaml:"color,default=true""`
|
Color bool `yaml:"color,default=true"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SyslogLoggingOutlet struct {
|
type SyslogLoggingOutlet struct {
|
||||||
@ -289,12 +289,12 @@ func enumUnmarshal(u func(interface{}, bool) error, types map[string]interface{}
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if in.Type == "" {
|
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]
|
v, ok := types[in.Type]
|
||||||
if !ok {
|
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 {
|
if err := u(v, false); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -34,7 +34,7 @@ func FromConfig(g *config.Global, in config.ConnectEnum) (*ClientFactory, error)
|
|||||||
return nil, errRPC
|
return nil, errRPC
|
||||||
}
|
}
|
||||||
|
|
||||||
config := streamrpc.ClientConfig{connConf}
|
config := streamrpc.ClientConfig{ConnConfig: connConf}
|
||||||
if err := config.Validate(); err != nil {
|
if err := config.Validate(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -61,8 +61,8 @@ type Pruner struct {
|
|||||||
err error
|
err error
|
||||||
|
|
||||||
// State Exec
|
// State Exec
|
||||||
prunePending []fs
|
prunePending []*fs
|
||||||
pruneCompleted []fs
|
pruneCompleted []*fs
|
||||||
}
|
}
|
||||||
|
|
||||||
type PrunerFactory struct {
|
type PrunerFactory struct {
|
||||||
@ -253,14 +253,14 @@ func statePlan(a *args, u updater) state {
|
|||||||
return onErr(u, err)
|
return onErr(u, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
pfss := make([]fs, len(tfss))
|
pfss := make([]*fs, len(tfss))
|
||||||
for i, tfs := range tfss {
|
for i, tfs := range tfss {
|
||||||
tfsvs, err := target.ListFilesystemVersions(ctx, tfs.Path)
|
tfsvs, err := target.ListFilesystemVersions(ctx, tfs.Path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return onErr(u, err)
|
return onErr(u, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
pfs := fs{
|
pfs := &fs{
|
||||||
path: tfs.Path,
|
path: tfs.Path,
|
||||||
snaps: make([]pruning.Snapshot, 0, len(tfsvs)),
|
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 {
|
func stateExec(a *args, u updater) state {
|
||||||
|
|
||||||
var pfs fs
|
var pfs *fs
|
||||||
state := u(func(pruner *Pruner) {
|
state := u(func(pruner *Pruner) {
|
||||||
if len(pruner.prunePending) == 0 {
|
if len(pruner.prunePending) == 0 {
|
||||||
pruner.state = Done
|
pruner.state = Done
|
||||||
|
Loading…
Reference in New Issue
Block a user