User Tools

Site Tools


golangbot_tutorial

This is an old revision of the document!


Overview

Notes on Golangbot Golang tutorial series.

The primary focus of Golang is to make the development of highly available and scalable web apps simple and easy.

Misc

Introduction

Introduction and Installation

Advantages of Go:

  • Simple syntax(?)
  • Fast compilation
  • Static linking
  • Concurrency (goroutines and channels)
  • Garbage collection
  • Simple language specification
  • Tooling
    • /usr/bin/gofmt (golang-bin package)
    • /usr/bin/golint (golint package)
    • go help vet
    • go help tool

Used as the basis for Docker and Kubernetes.

Third-party tooling, IDEs, etc.

Hello World

Variables, Types and Constants

Variables

Types

  • Go is strict about explicit typing.

Constants

  • Value must be known at compile time
  • Not sure what it means that “const” things have a “default” type until used
  • What does it mean that something is “untyped”?

Functions and Packages

Functions

Packages

Conditional Statements and Loops

if else statement

Loops

Switch Statement

Arrays, Slices and Variadic Functions

Arrays and Slices

Variadic Functions

More Types

Maps

Strings

Pointers, Structures and Methods

Pointers

Structures

Methods

Interfaces

Interfaces I

Interfaces II

Concurrency

Introduction to Concurrency

Goroutines

Channels

Buffered Channels and Worker Pools

Select

Mutex

Object Oriented Programming

Structs instead of Classes

Composition instead of inheritance

Polymorphism

Defer and Error Handling

Defer

Error Handling

Custom Errors

Panic and Recover

First Class Functions

Reflection

File Handling

Reading files

Writing files

golangbot_tutorial.1566754177.txt.gz · Last modified: 2019/08/25 17:29 by rpjday