Skip to content

Commit 7bbea54

Browse files
authored
fix: should use type int64 for strconv.FormatInt (#435)
1 parent 96c7f9c commit 7bbea54

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,11 @@ matching := lo.FilterMap([]string{"cpu", "gpu", "mouse", "keyboard"}, func(x str
327327
Manipulates a slice and transforms and flattens it to a slice of another type. The transform function can either return a slice or a `nil`, and in the `nil` case no value is added to the final slice.
328328

329329
```go
330-
lo.FlatMap([]int{0, 1, 2}, func(x int, _ int) []string {
331-
return []string{
332-
strconv.FormatInt(x, 10),
333-
strconv.FormatInt(x, 10),
334-
}
330+
lo.FlatMap([]int64{0, 1, 2}, func(x int64, _ int) []string {
331+
return []string{
332+
strconv.FormatInt(x, 10),
333+
strconv.FormatInt(x, 10),
334+
}
335335
})
336336
// []string{"0", "0", "1", "1", "2", "2"}
337337
```

0 commit comments

Comments
 (0)