参考文档:
https://www.cnblogs.com/zdz8207/p/golang-learn-7.html
https://blog.csdn.net/mctlilac/article/details/105169750