Skip to content

Commit

Permalink
add comment when function-user sets chunkSize is less than 1
Browse files Browse the repository at this point in the history
  • Loading branch information
sho0126hiro committed Feb 19, 2023
1 parent 6bdf150 commit c5e1716
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/pkg/slice/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func ToStringSet(s []string) []string {
}

// SplitStringSliceInChunks SplitStringSliceInChunk split slice in chunk
// if you set chunkSize is less than 1, this function returns a 2 dimensional slice with 1 chunk ([][]string{s}).
// TODO: Update 1.18+ and use generics
func SplitStringSliceInChunks(s []string, chunkSize int) (chunks [][]string) {
if chunkSize < 1 {
Expand Down

0 comments on commit c5e1716

Please sign in to comment.