Fix ciso8601 issue in collections tests.
[arvados.git] / services / keepstore / config.go
index bbce883504856cc49ac0d6317cd0c6d47fb4fd65..c9c9ae1158ec323f572524adb3e7586590d8f788 100644 (file)
@@ -40,6 +40,11 @@ type Config struct {
        EnableDelete        bool
        TrashLifetime       arvados.Duration
        TrashCheckInterval  arvados.Duration
+       PullWorkers         int
+       TrashWorkers        int
+       EmptyTrashWorkers   int
+       TLSCertificateFile  string
+       TLSKeyFile          string
 
        Volumes VolumeList
 
@@ -94,11 +99,11 @@ func (cfg *Config) Start() error {
                cfg.debugLogf = func(string, ...interface{}) {}
        }
 
-       if f := formatter[strings.ToLower(cfg.LogFormat)]; f == nil {
+       f := formatter[strings.ToLower(cfg.LogFormat)]
+       if f == nil {
                return fmt.Errorf(`unsupported log format %q (try "text" or "json")`, cfg.LogFormat)
-       } else {
-               log.Formatter = f
        }
+       log.Formatter = f
 
        if cfg.MaxBuffers < 0 {
                return fmt.Errorf("MaxBuffers must be greater than zero")
@@ -217,9 +222,9 @@ var VolumeTypes = []func() VolumeWithExamples{}
 
 type VolumeList []Volume
 
-// UnmarshalJSON, given an array of objects, deserializes each object
-// as the volume type indicated by the object's Type field.
-func (vols *VolumeList) UnmarshalJSON(data []byte) error {
+// UnmarshalJSON -- given an array of objects -- deserializes each
+// object as the volume type indicated by the object's Type field.
+func (vl *VolumeList) UnmarshalJSON(data []byte) error {
        typeMap := map[string]func() VolumeWithExamples{}
        for _, factory := range VolumeTypes {
                t := factory().Type()
@@ -252,7 +257,7 @@ func (vols *VolumeList) UnmarshalJSON(data []byte) error {
                if err != nil {
                        return err
                }
-               *vols = append(*vols, vol)
+               *vl = append(*vl, vol)
        }
        return nil
 }