https://chinaevent.microsoft.com/events
Micro architecture & design patterns for microservices https://micro.mu/blog/2016/04/18/micro-architecture.html
Introducing Micro - a microservice ecosystem
https://micro.mu/blog/2016/03/17/introduction.html
https://docs.microsoft.com/en-us/azure/architecture/patterns/
類(lèi)是有行為的數(shù)據(jù)杂穷,為閉包是有數(shù)據(jù)的行為悍缠;
go mod tidy
gin.Default()
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
gin.SetMode(gin.ReleaseMode)
gin.SetMode(gin.DebugMode)
os.Create
io.MultiWriter
gin.DefaultWriter
go get -u github.com/logrusorgru/aurora
go get -u github.com/mattn/go-colorable
https://segmentfault.com/blog/eddycjy
有一點(diǎn)值得注意,golang的不定參數(shù)不需要強(qiáng)制綁定參數(shù)的出現(xiàn)耐量。
舉個(gè)例子飞蚓,我想在c語(yǔ)言中實(shí)現(xiàn)一個(gè)求和任意個(gè)整數(shù)的函數(shù)sum:
int sum(int num, ...) {
// todo
}
我們只有先指定至少一個(gè)非不定參數(shù)的形參(num)才能使用...不定參數(shù),在golang中是不需要這樣做的:
func sum(nums ...int) int {
//todo
}
這也是golang語(yǔ)法簡(jiǎn)潔的其中一個(gè)體現(xiàn)廊蜒。
了解golang的不定參數(shù)(... parameters)趴拧,這一篇就夠了