aboutsummaryrefslogtreecommitdiffstats
path: root/repository/config_mem.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository/config_mem.go')
-rw-r--r--repository/config_mem.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/repository/config_mem.go b/repository/config_mem.go
index e2cffd9c..bd680d03 100644
--- a/repository/config_mem.go
+++ b/repository/config_mem.go
@@ -59,18 +59,18 @@ func (mc *memConfig) ReadBool(key string) (bool, error) {
return strconv.ParseBool(val)
}
-func (mc *memConfig) ReadTimestamp(key string) (*time.Time, error) {
+func (mc *memConfig) ReadTimestamp(key string) (time.Time, error) {
value, err := mc.ReadString(key)
if err != nil {
- return nil, err
+ return time.Time{}, err
}
+
timestamp, err := strconv.Atoi(value)
if err != nil {
- return nil, err
+ return time.Time{}, err
}
- t := time.Unix(int64(timestamp), 0)
- return &t, nil
+ return time.Unix(int64(timestamp), 0), nil
}
// RmConfigs remove all key/value pair matching the key prefix