分类: 未分类

91 篇文章

Golang tips
How to write customized error with optional error struct passed type Y2HError struct { errMsg string errDetail error } func (e *Y2HError) Error() string { if e.errDetail != ni…
Golang OOP
How to simiuate super.init() in Python type Baser interface { Init(name string) Do() } type BaseClass struct { name string } func (cls *BaseClass) Init(name string) { cls.name…
Golang makefile
Why go install already checks if the binary is up-to-date before installation. go test is all you need to kick-off tests that run at face melting speed. It's natural to ask, &…
go beginner
go变量声明与C语言的不同: go变量声明引入var关键字可以一次同时声明多个变量 var myvar1, myvar2, myvar3 int OR var ( myvar1 int myvar2 string ) 变量类型声明与C类似,类型关键字在变量后面且没分号结束,C语言类型关键字在变量前面且以分号结束 go: var myvar int …
How to setup rabbitmq cluster in kubernetes
There are multiple projects aims to implement this, here we will use the official one. This post mainly focus on the pitfalls while apply the official autocluster plugin. Pref…
Python framework for c10k
C10k problem How to configure operating systems and write code to support thousands of clients is what we called C10k problem Candidates: Django It is a high-level Python Web …
MySQL 5.7 ERROR 1045 (28000) Access denied
The reason is MySQL v 5.7 or higher generates a temporary random password after installation and stored that in mysql error log file, located at /var/log/mysqld.log for an ins…