diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-06-27 10:56:03 +0200 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-06-27 10:56:03 +0200 |
commit | a9886bf2f8a35369a2c42070c5f83504dfab2bc5 (patch) | |
tree | d078b542f271bc2d16d756a3eb5d1ebce65f0043 /Go Source Files.md | |
parent | fbb81e5f2c5542d86ffbb0cb8e05ce2640ed65de (diff) |
vault backup: 2025-06-27 10:56:02
Diffstat (limited to 'Go Source Files.md')
-rw-r--r-- | Go Source Files.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Go Source Files.md b/Go Source Files.md new file mode 100644 index 0000000..cad6d6d --- /dev/null +++ b/Go Source Files.md @@ -0,0 +1,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.
\ No newline at end of file |