What is the difference between the = and := operator? Technology Community › Category: Golang › What is the difference between the = and := operator? 0 Vote Up Vote Down VietMX Staff asked 4 years ago In Go, := is for declaration + assignment, whereas = is for assignment only. For example, var foo int = 10 is the same as foo := 10.