mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
store: remove unused code
This commit is contained in:
parent
6a30d3ba04
commit
2cd6594485
20
store/ttl.go
20
store/ttl.go
@ -1,20 +0,0 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Convert string duration to time format
|
||||
func TTL(duration string) (time.Time, error) {
|
||||
if duration != "" {
|
||||
duration, err := strconv.Atoi(duration)
|
||||
if err != nil {
|
||||
return Permanent, err
|
||||
}
|
||||
return time.Now().Add(time.Second * (time.Duration)(duration)), nil
|
||||
|
||||
} else {
|
||||
return Permanent, nil
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user