when you are using go keyword in Golang, it means that you are programming concurrency. So whatever you passed your variable to the concurrent function, the variable should be considered as a local variable of the function The below example is so popular and it can cause an unexpected error in your code func main () { slice := [] Model { { x : sql . NullString { String : "1" , Valid : true , }, y : 1 , z : "1" , }, { x : sql . NullString { String : "2" , Valid : true , }, y : 2 , z : "2" , }, { x : sql . NullString { String : "3" , Valid : true , }, y : 3 , z : "3" , }, } c := make ( chan int , 3 ) for i , v := range slice { log . Println ( i , v ) log . Printf ( "1---> %v \n ...