search

Next Section: 有缓冲通道使用以及实现互斥锁277 plays

5 秒后自动播放下一节
  Watch Again

Golang Basics to Mastery (Season 2)

Introduction >
ChapterCourseware
Chapter1Go language interface

Interface introduction and implementation of a simple interface

Introduction to interface implementation details

Two ways to assign values ​​to interfaces

Interface type as parameter

Interface nesting

Go language empty interface

Type assertions in go language

Slice or structure assigned to empty interface access

One-to-many-to-one relationship between types and interfaces

Chapter2net/http session management html/template

Implement web server

http sends get request with parameters and obtains parameters

http sends post request and obtains post data

Get cookie and session settings

Simple introduction to using template

Pipe if-range usage

with built-in function custom function use

Template nesting and context-aware escaping

Chapter3Goroutine

Introduction to process thread coroutine parallelism and concurrency

Introduction to go coroutines and GPM scheduling

Goroutine coroutine creation and running process analysis

waitGroup thread synchronization implementation

Introduction to the use of runtime packages

Mutex lock solves the problem of multi-coroutine resource competition

Thread-safe sync.map usage

Use sync.once to implement singleton mode

Atomic atomic operation implements inventory reduction operation

Other uses of atomic operations

Chapter4channel channel

channel and unbuffered channel use

Channel range traversal and closing

Use buffered channels and implement mutex locks

One-way channel implements read-only and write-only

select multiplexing and timeout processing

Chapter5Network programming socket/websocket

Socket implements client-server communication

Concurrent socket implementation

websocket realizes mutual communication

Chapter6File log operations

File operation file writing and creation

File reading for file operations

Log usage and writing to files

Chapter7Unit testing performance testing reflection

Introduction to unit testing and simple use

Unit testing other uses

Benchmark testing - performance testing use

The use of reflection TypeOf

Reflection's ValueOf uses to change the variable value

Using reflection in structures

Chapter8Go operates Mysql/Redis/Memcache

go connect to MySQL database

MySQL insert and query

MySQL update delete transaction

Go operation Redis

Go operates Memcache

  • CancelreplySending
  • Cancelpost a noteSending