gopkg icon indicating copy to clipboard operation
gopkg copied to clipboard

Universal Utilities for Go

Results 46 gopkg issues
Sort by recently updated
recently updated
newest added

Donate choleraehyq/pid, which is widely used inside bytedance. Signed-off-by: Cholerae Hu

### Summary QuoteSingle("a") -> 'a' QuoteSingle("abc") -> 'abc' QuoteSingle("ab'c") -> 'ab\'c' ### Motivation wu ### Explanation _No response_

enhancement

Given that we are working on an opensource project, I'd like to propose to opensource the releasing process. Maybe following work can be documented on Wiki: - Release model -...

documentation

https://github.com/bytedance/gopkg/runs/2526939630

bug

https://github.com/bytedance/gopkg/blob/develop/lang/mcache/mcache.go 这里使用bsr有啥特殊的背景或者考虑吗?我在mac跟linux端的bench中都是bits.Len64()更快一些。

question

might not create new worker in time in some case

在工程场景中我们会遇到,当前上下文有超时时间、一些场景后(RPC Response)释放资源,但是我们还要继续去 执行一些任务。如果我们用到了协程池,我们可能需要传递没有超时、取消的上下文进去。(上下文中会携带TraceID等信息用来溯源)

在计算bsr的时候,某些操作系统上使用一种for循环的方式计算,时间复杂度是O(n),n是这个数第从小到大最大的为1的位。 经过golang sdk库math/bits/bits.go/Len函数的启发,我想出了一种算法,具有O(1)的复杂度, 并且计算时间稳定。 并且针对64位操作系统和32位操作系统有不同的优化。 几乎减少了百分之九十的计算时间。

enhancement
good first issue

1. rm useless ci job 2. enable test ci for pull request job 3. fix license check ci 4. speed up ci test 5. fix some unstable unit test 6....