Go Concepts - Functions: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Go Concepts =Overview= =Built-in Functions= * make() * append() * go...")
 
Line 5: Line 5:
=Overview=
=Overview=


=Syntax=
<pre>
func <name>(<parameter1>, <parameter2>,...) (<return-type1>, <return-type2>, ...) {
  statement1
  statemen2
  ...
  return <return-value1>, <return-value2>
}
</pre>
<pre>
</pre>


=Built-in Functions=
=Built-in Functions=

Revision as of 21:45, 17 March 2016

Internal

Overview

Syntax

func <name>(<parameter1>, <parameter2>,...) (<return-type1>, <return-type2>, ...) {

   statement1
   statemen2
   ...

   return <return-value1>, <return-value2>

}


Built-in Functions

Closures

Anonymous function that capture local variables.

More about closures is available here.