gen go generate命令是go 1.4版本里面新添加的一个命令,当运行go generate时,它将扫描与当前包相关的源代码文件,找出所有包含”//go:generate”的特殊注释,提取并执行该特殊注释后面的命令,命令为可执行程序,形同shell下面执行。
模版模式 Define the skeleton of an algorithm in an operation,deferring some steps tosubclasses.Template Method lets subclasses redefine certain steps of analgorithm without changing the algorithm’s structure.(定义一个操作中的算法的框架,而将一些步骤延迟到子类中。使得子类可以不改变一个算法的结构即可重定义该算法的某些特定步骤。)
策略模式 策略模式(Strategy Pattern):定义一系列算法,将每一个算法封装起来,并让它们可以相互替换。策略模式让算法独立于使用它的客户而变化,也称为政策模式(Policy)。
```makefile 项目通用变量 ## 项目通用变量 git 参数 # git 参数 GIT_VERSION=$(shell git tag | grep $(APP_NAME)-v | sort -r –version-sort | head -n1) GIT_VERSION=$(shell git tag | grep $(APP_NAME)-v | sort -r –version-sort | head -n1) GIT_COMMIT_ID=$(shell git rev-parse –short=8 HEAD) GIT_COMMIT_ID=$(shell git rev-parse –short=8 HEAD) GIT_BRANCH=$(shell git branch | sed -n -e ‘s/^* (.)/\1/p’) GIT_BRANCH=$(shell git branch | sed -n -e ‘s/^* (.)/\1/p’) GIT_MASTER_DIFF=$(shell git log –no-merges -q origin/master ^$(GIT_BRANCH) | grep commit)
Redis容量预估 http://www.redis.cn/redis_memory
protocol buffer
中文文档:https://json-schema.apifox.cn/
基于标签维度的数据分析
静态博客及博客同步服务
PHP框架,参考yii,个人兴趣
分布式任务调度系统
Swoole服务 (即时通讯 web聊天室)
技术研究及创建应用服务