Quidest?

Shorthand assignment in Go

ยท Lorenzo Drumond

Go has a shorthand for both declaring and assigning a variable:

1x := 1

will both declare a variable x with the type of the value on the right-hand side, and assign the value to 1.

References

#programming #type #golang #zero #default #variables