diff options
author | bryan newbold <bnewbold@robocracy.org> | 2023-10-29 21:59:25 -0700 |
---|---|---|
committer | bryan newbold <bnewbold@robocracy.org> | 2023-10-29 21:59:59 -0700 |
commit | dcdfea67b43be9627514e9c7a73797d37d5db013 (patch) | |
tree | a97944317baa2a54c77118fcfacd2aac20ae4463 | |
parent | bddda1613c461aa96a3f5ee01b48f2456cdd6c62 (diff) | |
download | knowledge-dcdfea67b43be9627514e9c7a73797d37d5db013.tar.gz knowledge-dcdfea67b43be9627514e9c7a73797d37d5db013.zip |
old golang notes
-rw-r--r-- | software/golang.page | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/software/golang.page b/software/golang.page index 729b6e5..9897b65 100644 --- a/software/golang.page +++ b/software/golang.page @@ -12,6 +12,21 @@ function itself is called (this is intuitive). The golang documentation gives the examples of closing file handles and printing HTML footers (defer right after printing the header). +Language Notes +---------------- + +`complex64` and `complex128` are built-in numeric types. `rune` is also built-in. + +Capitalization controls visibility. Everything is visible within a package; +only upper-case things are visible outside the package. + +All types have a "zero value" which they are automatically initialized with if +not defined otherwise. These include `false` for boolean, 0 for numerics, empty +string, and `nil` in many cases. This recurses down in to structs, collections, +etc. + +TODO: capitalization of struct fields + Learning Resources ------------------- In addition to the excellent dynamic Tour, documentation, and other things |