From 7bbea5482ea202e59e662e13e6edd69b06dddf76 Mon Sep 17 00:00:00 2001 From: apriil15 Date: Thu, 27 Jun 2024 20:06:04 +0800 Subject: [PATCH] fix: should use type int64 for strconv.FormatInt (#435) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a61fbfd0..478b468f 100644 --- a/README.md +++ b/README.md @@ -327,11 +327,11 @@ matching := lo.FilterMap([]string{"cpu", "gpu", "mouse", "keyboard"}, func(x str 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. ```go -lo.FlatMap([]int{0, 1, 2}, func(x int, _ int) []string { - return []string{ - strconv.FormatInt(x, 10), - strconv.FormatInt(x, 10), - } +lo.FlatMap([]int64{0, 1, 2}, func(x int64, _ int) []string { + return []string{ + strconv.FormatInt(x, 10), + strconv.FormatInt(x, 10), + } }) // []string{"0", "0", "1", "1", "2", "2"} ```