We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main import ( "fmt" "github.com/duke-git/lancet/v2/slice" "github.com/samber/lo" ) func main() { arr := []string{"a", "b", "c"} fmt.Println(slice.Chunk(arr, 10)) fmt.Println(lo.Chunk(arr, 10)) }
输出
[[a] [b] [c]] [[a b c]]
当chunk长度大于slice长度时,lo库的处理逻辑是正确的
The text was updated successfully, but these errors were encountered:
package main import ( "fmt" "github.com/duke-git/lancet/v2/slice" "github.com/samber/lo" ) func main() { arr := []string{"a", "b", "c"} fmt.Println(slice.Chunk(arr, 10)) fmt.Println(lo.Chunk(arr, 10)) } 输出 [[a] [b] [c]] [[a b c]] 当chunk长度大于slice长度时,lo库的处理逻辑是正确的
@feeops v2分支上已修复chunk, 下个版本会更新
Sorry, something went wrong.
v2.1.11版本已修复。
No branches or pull requests
输出
当chunk长度大于slice长度时,lo库的处理逻辑是正确的
The text was updated successfully, but these errors were encountered: