Skip to content

Instantly share code, notes, and snippets.

@iporsut
Last active November 9, 2018 06:32
Show Gist options
  • Save iporsut/05c6442d31c69d27133a9f67a05f01e4 to your computer and use it in GitHub Desktop.
Save iporsut/05c6442d31c69d27133a9f67a05f01e4 to your computer and use it in GitHub Desktop.
Basic Go Course Outline

Basic Go programming

เป้าหมาย

เป้าหมายของคอร์สนี้คือให้ผู้เรียนได้เข้าใจคอนเซ็ปพื้นฐานของภาษา Go และทดลองใช้ standard package เพื่อพัฒนา system software เช่น Web application หรือ RESTful service และเขียน unittest เบื้องต้นได้

ระยะเวลา

ระยะเวลา 2 วัน วันละประมาณ 7-8 ชั่วโมง

จำนวนผู้เรียนต่อรอบ

5 คนขึ้นไปแต่ไม่เกิน 20 คน

หัวข้อ

  1. Basic Go programming
    1. Install and setup Go and Go tools
      1. Install Go
      2. Install Git
      3. Install VSCode
      4. Install Go Extensions
      5. Install Go tool
    2. Go basic command
      1. Hello, World
      2. go build
      3. go install
      4. go run
      5. go get
    3. Basic I/O
      1. fmt.Println
      2. fmt.Printf
      3. fmt.Scanf
    4. Basic Data Type
      1. Numbers
      2. String
      3. Bool
    5. Variables declaration
      1. full form
      2. short form
      3. scope
    6. Basic operators
      1. Number Operator
      2. Bool Operator
      3. String Operator
    7. Condition
      1. if else
      2. switch case
      3. break, continue, goto and label
    8. Basic Loop
      1. for basic 3 forms
    9. Function
      1. Function declarations
      2. Multiple return values
      3. Anonymous function
      4. Function type
    10. Pointer
      1. pointer tyep and value
      2. variable declarations
      3. & and * operators
      4. passing pointer to function
    11. Array
      1. Declarations
      2. Array literal
      3. Indexing
      4. Loop
      5. len
      6. passing array to function
    12. Slice
      1. slice value
      2. slice type
      3. slice declarations
      4. slice operator
      5. Indexing
      6. Loop
      7. len
      8. cap
      9. make slice
      10. slice literal
      11. append slice
      12. copy slice
      13. passing slice to function
      14. Sorting value in slice and array
    13. Map
      1. declarations
      2. map literal
      3. make map
      4. lookup value by key
      5. len
      6. loop
      7. delete value by key
      8. passing map to function
    14. Struct
      1. new type struct
      2. struct variable declarations
      3. struct literal
      4. access field with .
      5. pointer to struct
      6. get address (pointer value) from struct field
    15. Nested Data
      1. slice of struct
      2. slice field in struct
      3. map field in struct
      4. map struct as key
      5. sorting slice of struct by field
    16. Method
      1. create to named type
      2. create method
      3. method receiver
    17. Testing
    18. Build RESTful API with echo framework and MongoDB

Go Basic Training

Install and setup Go and Go tools

Install Go

  1. go version

  2. Set up GOROOT and GOPATH

  3. go env

Install Git

Install VSCode

Install Go Extensions

  1. Set up GOROOT and GOPATH

Install Go tool

Go basic command

Hello, World

go build

go install

go run

go get

Basic I/O

fmt.Println

fmt.Printf

fmt.Scanf

Basic Data Type

Numbers

  1. Integer

    1. int

    2. byte

    3. rune

  2. Float

    1. float64

    2. float32

  3. Complex

    1. complex64

String

Bool

Variables declaration

full form

short form

scope

Basic operators

Number Operator

Bool Operator

String Operator

Condition

if else

switch case

break, continue, goto and label

Basic Loop

for basic 3 forms

Function

Function declarations

Multiple return values

Anonymous function

Function type

Pointer

pointer tyep and value

variable declarations

& and * operators

passing pointer to function

Array

Declarations

Array literal

Indexing

Loop

len

passing array to function

Slice

slice value

slice type

slice declarations

slice operator

Indexing

Loop

len

cap

make slice

slice literal

append slice

copy slice

passing slice to function

Sorting value in slice and array

Map

declarations

map literal

make map

lookup value by key

len

loop

delete value by key

passing map to function

Struct

new type struct

struct variable declarations

struct literal

access field with .

pointer to struct

get address (pointer value) from struct field

Nested Data

slice of struct

slice field in struct

map field in struct

map struct as key

sorting slice of struct by field

Method

create to named type

create method

method receiver

Testing

Build RESTful API with echo framework (or Buffalo web framework)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment