Memos - Go helper

Shallow copy of a struct

<pre>queryVars := &queryParameters</pre>

Online assignation and test

<pre>
if err := callMyFunction(); err != nil {
    return err
}
</pre>

Pointers In go, when calling functions argument are copied to function. We can define pointer using *.

  • is also used to “dereference” pointer variables. We can use the & operator to find the address of a variable. Another way to get a pointer is to use the built-in new function