gotchagoCritical
Difference between := and = operators in Go
Viewed 0 times
operatorsandbetweendifference
Problem
What is the difference between the
= and := operators, and what are the use cases for them? They both seem to be for an assignment?Solution
Only
👉 There are some rules though. See this other answer for more details.
= is the assignment operator.:= is a part of the syntax of the short variable declaration clause.👉 There are some rules though. See this other answer for more details.
Context
Stack Overflow Q#17891226, score: 282
Revisions (0)
No revisions yet.