分享一个Golang 学习站点:Go by Example,示例,源码,注释
很不错的一个网站和工具。主要内容包括:
1、为 Golang 各个知识点而写的小程序(放在 play.golang.org );
2、适当的注释;
3、整站开源,从github clone 后,读者可利用内建的工具生成本地静态文件,甚至可以生成一个网站。
网址:https://gobyexample.com/
源码:https://github.com/mmcgrana/gobyexample
知识点目录
Hello World
Values
Variables
Constants
For
If/Else
Switch
Arrays
Slices
Maps
Range
Functions
Multiple Return Values
Variadic Functions
Closures
Recursion
Pointers
Structs
Methods
Interfaces
Errors
Goroutines
Channels
Channel Buffering
Channel Synchronization
Channel Directions
Select
Timeouts
Non-Blocking Channel Operations
Closing Channels
Range over Channels
Timers
Tickers
Worker Pools
Rate Limiting
Atomic Counters
Mutexes
Stateful Goroutines
Sorting
Sorting by Functions
Panic
Defer
Collection Functions
String Functions
String Formatting
Regular Expressions
JSON
Time
Epoch
Time Formatting / Parsing
Random Numbers
Number Parsing
URL Parsing
SHA1 Hashes
Base64 Encoding
Reading Files
Writing Files
Line Filters
Command-Line Arguments
Command-Line Flags
Environment Variables
Spawning Processes
Exec'ing Processes
Signals
Exit
有疑问加站长微信联系(非本文作者)