Go programming language specification
Assignments
The appointment continues in two stages. Firstly, expression index operands and pointers (including an implicit pointer pointers in selectors) on the left and expressions on the right are evaluated in the usual way. Secondly, tasks are performed in order from left to right.
Opends
Operands denote elementary values ββin an expression. The operand can be a literal, (possibly qualified) non-empty identifier, denoting a constant, variable or function, a method expression, giving a function or expression in brackets.
Assessment Procedure
When evaluating the operands of an expression, assignment, or return, an operator, all function calls, method calls, and operation relationships are evaluated in lexical order from left to right.
For example, in the destination (function-local)
y[f()], ok = g(h(), i()+x[j()], <-c), k()
function calls and communication occur in the order f (), h (), i (), j (), <-c, g () and k (). However, the order of these events in comparison with the estimate and indexation of x and the estimate of y is not indicated.
Adding and copying fragments
If the capacitance s is not large enough to correspond to additional values, append allocates a new, sufficiently large base array that fits both existing slice elements and additional values. Otherwise, append reuses the underlying array.
but the order of events of the function call in comparison with the evaluation of other operands is not specified ( Order of evaluation ).