https://github.com/0xisk/exploring-golang
A repository focused on learning and practicing Golang
https://github.com/0xisk/exploring-golang
go golang golang-application golang-examples golang-tools leanring learning-by-doing
Last synced: 5 months ago
JSON representation
A repository focused on learning and practicing Golang
- Host: GitHub
- URL: https://github.com/0xisk/exploring-golang
- Owner: 0xisk
- Created: 2020-08-20T21:54:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-18T06:15:26.000Z (over 5 years ago)
- Last Synced: 2024-05-23T04:21:16.548Z (about 2 years ago)
- Topics: go, golang, golang-application, golang-examples, golang-tools, leanring, learning-by-doing
- Language: Go
- Homepage:
- Size: 1.21 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Exploring Golang
A repository focused on learning and practicing Golang
## Go (golang)
1. Strong and statically typed
2. Excellent community
3. Key features
- Simplicity
- Fast compile times
- Garbage collected
- Built-in concurrency
- Compile to standalone binaries
## Variables
### Agenda:
- Variable declaration
- Redeclaration and shadowing
- Visibility
- Naming conventions
- Type conversions
#### Variable declaration:
- var foo int
- var foo int = 42
- foo := 42
#### Cant redeclare variables, but can shadow them.
#### All variables must be used.
#### Visibility:
- lower case first letter for package scope
- upper case first letter to export
- no private scope
#### Naming conventions:
- Pascal or camelCase
- Capitalize acronyms (HTTP, URL)
- As short as reasonable
- Longer names for longer lives
#### Type conversions:
- DestinationType(variable)
- Use (strconv) package for string
## Primitives
### Agenda:
- Boolean type
- Numeric types
- Integers
- Floating point
- Complex numbers
- Text types
## Resources
- [golang.org](https://golang.org/)
- [golang docs](https://golang.org/doc/)