# flowcontrol - for - for i := 0; i < 10; i++ { - for ; sum < 1000; { - For is Go's "while" - for sum < 1000 { - Forever - for { - if - if x < 0 { - } else { - if v := math.Pow(x…
#method - Methods - Go does not have classes. However, you can define methods on types. - func (f MyFloat) Abs() float64 { - Interfaces - type Abser interface { Abs() float64 } - One of the most ubiquitous interfaces…
# A Tour of Go - go get golang.org/x/tour/gotour - https://tour.golang.org/ # welcome - fmt.Println("The time is", time.Now()) # basic - Packages && Imports - package main - import (\n "fmt"\n …
gosuri/uiprogress: A go library to render progress bars in terminal applicationshttps://github.com/gosuri/uiprogress 依赖go-isatty,用于判断程序是在什么终端运行https://github.com/mattn/go-isatty 依赖uilive,提供一个定时刷新的命令行输出https://github.com/gosuri/uilive uiprogress.Start…
daviddengcn/go-colortext: Change the color of console text.https://github.com/daviddengcn/go-colortext dixonwille/wlog: A simple logging interface that supports cross-platform color and concurrency.https://github.com/dixonwille/wlog package main impo…