minimal Redis cluster setting
brew info redis
You can achieve the same effect without a function though: just create a local copy and use the address of that:
for _, each := range arr { each2 := each err := ds.repo.Insert(&each2) // ... }
Also note that you may also store the address of the slice elements:
for i := range arr { err := ds.repo.Insert(&arr[i]) // ... }
Solve “using a reference for the variable on range scope `xxxx` (scopelint)” error.
s := strconv.Itoa(123)
var n int64 = 123 s := strconv.FormatInt(n, 10) // s == "123" (decimal)
var n int64 = 123 s := strconv.FormatInt(n, 16) // s == "7b" (hexadecimal)
s := "123" n, err := strconv.Atoi(s)
s := "123" n, err := strconv.ParseInt(s, 10, 64)