blob: cad6d6d416aa52689027a302c9bd8468c7bc1f8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[[Golang]]
[[Go Packages]]
---
A source file has a specific structure.
1. Package declaration
2. Import declarations
Only those two declarations above have a mandatory place in the source file. After the import declarations any other declaration may follow **in any order**.
For example:
* variable declarations
- type definitions
- function declarations
# Todo (maybe split off)
A function declaration : `func <name> (<param list>) (<result list>)`. No semicolons, unless multiple statements on 1 line.
|