From a9886bf2f8a35369a2c42070c5f83504dfab2bc5 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 27 Jun 2025 10:56:03 +0200 Subject: vault backup: 2025-06-27 10:56:02 --- Go Source Files.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Go Source Files.md (limited to 'Go Source Files.md') 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 () ()`. No semicolons, unless multiple statements on 1 line. \ No newline at end of file -- cgit v1.2.3