MCPcopy Create free account
hub / github.com/git-bug/git-bug / ReadTimestamp

Method ReadTimestamp

repository/config_mem.go:67–79  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

65}
66
67func (mc *MemConfig) ReadTimestamp(key string) (time.Time, error) {
68 value, err := mc.ReadString(key)
69 if err != nil {
70 return time.Time{}, err
71 }
72
73 timestamp, err := strconv.Atoi(value)
74 if err != nil {
75 return time.Time{}, err
76 }
77
78 return time.Unix(int64(timestamp), 0), nil
79}
80
81// RemoveAll remove all key/value pair matching the key prefix
82func (mc *MemConfig) RemoveAll(keyPrefix string) error {

Callers

nothing calls this directly

Calls 1

ReadStringMethod · 0.95

Tested by

no test coverage detected