File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ type StringKey string
3232
3333func (key StringKey ) Hash () int {
3434 hash := fnv.New32 ()
35- io.WriteString (hash, string (key))
35+ io.WriteString (hash, string (key)) // nolint: errcheck
3636
3737 return int (hash.Sum32 ())
3838}
3939
40- func (key StringKey ) Equals (other interface {} ) bool {
40+ func (key StringKey ) Equals (other hashmap . Key ) bool {
4141 return key == other.(StringKey)
4242}
4343
@@ -48,10 +48,10 @@ const (
4848
4949func main () {
5050 storage := hashmap.NewConcurrentHashMap ()
51- cleaner := gc.NewPartialGC (storage, time. Now )
51+ cleaner := gc.NewPartialGC (storage)
5252 go gc.Run (context.Background (), cleaner, gcPeriod)
5353
54- timeZones := cache.NewCache (storage, time. Now )
54+ timeZones := cache.NewCache (cache. WithStorage (storage) )
5555 timeZones.Set (StringKey (" EST" ), -5 *60 *60 , exampleDelay/2 )
5656 timeZones.Set (StringKey (" CST" ), -6 *60 *60 , exampleDelay/2 )
5757 timeZones.Set (StringKey (" MST" ), -7 *60 *60 , exampleDelay/2 )
You can’t perform that action at this time.
0 commit comments