// this will solve the error
package example import "strconv" var a int = 0 func Some() string { incr(&a) return "example" + strconv.Itoa(a) } func incr(a *int) { // we used pointer here *a++ }