helloteemo
helloteemo
可能是因为 `string` 使用场景最多,所以提供 `New` 函数,默认key类型为 `string`,用来简化编程 如果要使用 `int` 类型作为 `key` 的话,可以使用 `NewStringer` 函数,实际使用并无差别 ```golang type Integer int func (i Integer) String() string { return strconv.Itoa(int(i)) } func main() { var...
> 增加NewGeneric[K comparable, V any]它不香吗?绕来绕去的。 提PR的机会这不就来了吗?
```golang func (m ConcurrentMap[K, V]) Count() int { count := 0 for i := 0; i < SHARD_COUNT; i++ { shard := m.shards[i] shard.RLock() count += len(shard.items) shard.RUnlock() } return...
> > ```go > > func (m ConcurrentMap[K, V]) Count() int { > > count := 0 > > for i := 0; i < SHARD_COUNT; i++ { > >...
@roseqin368 可以给下版本、复现代码吗?我没有复现出来 版本: `v2.0.1` ```go func main() { m := camp.New[string]() m.Clear() log.Print("ok") } ```
The memory leak problem is not in the concurrent-map library Can you post the contents of your libSymbol.genericSymbol structure? Your statement in a.go: `valueInmap.session = newValue.session` replaced the session, or...
> @helloteemo > > Thanks for your response. There is the GenericSymbol structure: > > ``` > type GenericSymbol struct { > Symbol string `json:"symbol,omitempty"` > Securities string `json:"securities,omitempty"` >...
@HummusB0x Yes, there are projects like this, [RSSHub](https://docs.rsshub.app/)
I will support Bilibili
> I will support Bilibili @luoqixyz @sunqb Implemented, check it out at [helloteemo/glance/tree/feature/bilibili](https://github.com/helloteemo/glance/tree/feature/bilibili)