An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Exploring Golang
A repository focused on learning and practicing Golang


screenshot

## 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/)