Files
logseq/pages/Go Programming Language.md

31 lines
762 B
Markdown
Executable File

- Go Syntax
- Package declaration
- Import packages
- Functions
- Statements and expression
- Go Variables
- type
- `int`
- `float`
- `string`
- `bool`
id:: 64ebf26b-33a0-428a-bd3f-7f1fb49ad891
- Declaring
- `var`
- `:=` only can be used inside functions
- Go Data Type
- **bool**
- **Numeric**
- | **Type** | **Size** |
|int | Platform Dependent |
|int8 | 8 bits/1 byte |
|int16 | 16 bits/2 byte |
|int32 | 32 bits/4 byte |
|int64 | 64 bits/8 byte |
| float32 | 32 bits or 4 bytes |
| float64 | 64 bits or 8 bytes |
- Complex Numbers
- | **Type** | **Property** |
| complex64 | Both real and imaginary part are float32 |
| complex128 | Both real and imaginary part are float64 |
- **string**