<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[楼外楼]]></title><description><![CDATA[专业技术学习和分享]]></description><link>https://blog.csdn.net/westhod</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; westhod]]></copyright><item><title><![CDATA[转--拜托！面试请不要再问我Spring Cloud底层原理]]></title><link>https://blog.csdn.net/westhod/article/details/104517304</link><guid>https://blog.csdn.net/westhod/article/details/104517304</guid><author>westhod</author><pubDate>Wed, 26 Feb 2020 14:59:21 +0800</pubDate><description><![CDATA[概述

毫无疑问，Spring Cloud是目前微服务架构领域的翘楚，无数的书籍博客都在讲解这个技术。不过大多数讲解还停留在对Spring Cloud功能使用的层面，其底层的很多原理，很多人可能并不知晓。因此本文将通过大量的手绘图，给大家谈谈Spring Cloud微服务架构的底层原理。
实际上，Spring Cloud是一个全家桶式的技术栈，包含了很多组件。本文先从其最核心的几个组件入手，来剖析...]]></description><category></category></item><item><title><![CDATA[redis入门系列（一）安装]]></title><link>https://blog.csdn.net/westhod/article/details/104282078</link><guid>https://blog.csdn.net/westhod/article/details/104282078</guid><author>westhod</author><pubDate>Wed, 12 Feb 2020 17:35:51 +0800</pubDate><description><![CDATA[redis作为缓存在很多系统中用得非常广泛，我现在公司的项目也在用，随着不断使用，对其了解也不断加深，在此我也记录下自己这段时间的探索和理解，它的特性、优点、与memcache的比较我就不多说了。网上也有很多文章，我这可能有点画蛇添足，我只是循我个人思路和历程做一个记录，希望对广大的程序猿有帮助，也就心满意足了。

首先我构思的是分为如下的章节，会陆续推出来：





本章是第一章，redis...]]></description><category></category></item><item><title><![CDATA[go模拟类的继承]]></title><link>https://blog.csdn.net/westhod/article/details/104193434</link><guid>https://blog.csdn.net/westhod/article/details/104193434</guid><author>westhod</author><pubDate>Thu, 06 Feb 2020 11:35:16 +0800</pubDate><description><![CDATA[golang没有类，只有struct，但也可以做到类的效果，如：


type Animal struct {
	Name   string
	Weight string
}

func (a *Animal) Eat(food string) {
	fmt.Printf("%s eat some food %s\n", a.Name, food)
}

go使用组合的形式实现了代码重用，当...]]></description><category></category></item><item><title><![CDATA[使用govendor管理golang项目依赖]]></title><link>https://blog.csdn.net/westhod/article/details/83543458</link><guid>https://blog.csdn.net/westhod/article/details/83543458</guid><author>westhod</author><pubDate>Tue, 30 Oct 2018 16:42:00 +0800</pubDate><description><![CDATA[最近在项目开发过程中，遇到一个问题，当代码编写完成后，执行go run 时，提示如下错误：



大概意思就是我有golang.org/x/net/trace的两个副本，且提示了，可以通过vendor的副本解决。见鬼了，我哪来的golang.org/x/net/trace两个副本？仔细观察，才发现，我之前已经安装了golang.org/x/net/trace，然后项目开发使用了etcd，该源码目录...]]></description><category></category></item><item><title><![CDATA[C++基类析构函数为什么须加上virtual]]></title><link>https://blog.csdn.net/westhod/article/details/82497167</link><guid>https://blog.csdn.net/westhod/article/details/82497167</guid><author>westhod</author><pubDate>Fri, 07 Sep 2018 15:48:56 +0800</pubDate><description><![CDATA[要探讨这个问题，我们首先看看如下代码



#define DATA_LEN 1024

class Human {

public:
	Human(int sex) : sex(sex) {}
	~Human() {
		std::cout &amp;lt;&amp;lt; &quot;Human distructiong&quot; &amp;lt;&amp;lt; std::endl;
	}

protected:
	int sex;
};
...]]></description><category></category></item><item><title><![CDATA[一个用golang编写的TCP服务端、客户端使用例子]]></title><link>https://blog.csdn.net/westhod/article/details/82348964</link><guid>https://blog.csdn.net/westhod/article/details/82348964</guid><author>westhod</author><pubDate>Mon, 03 Sep 2018 15:53:35 +0800</pubDate><description><![CDATA[使用golang进行socket编程，还是挺方便，我参考了一些网上文章和阅读了一些开源代码，也跟着学习如何进行golang的socket编程，这里只编写简单的服务端、客户端，抛砖引玉。

首先定义通讯协议，我使用protobuf，如何安装protobuf？可以参考我之前的文章：

https://mp.csdn.net/postedit/81983072

准备工作
定义协议，首先需要编写prot...]]></description><category></category></item><item><title><![CDATA[配置beego的logs模块]]></title><link>https://blog.csdn.net/westhod/article/details/82347771</link><guid>https://blog.csdn.net/westhod/article/details/82347771</guid><author>westhod</author><pubDate>Mon, 03 Sep 2018 14:21:13 +0800</pubDate><description><![CDATA[beego的logs模块挺好用，不过在配置logs模块的参数时，使用的是json字符串进行配置：


logs.SetLogger(logs.AdapterFile,`{&quot;filename&quot;:&quot;project.log&quot;,&quot;level&quot;:7,&quot;maxlines&quot;:0,&quot;maxsize&quot;:0,&quot;daily&quot;:true,&quot;maxdays&quot;:10}`)

这样手工拼个json字]]></description><category></category></item><item><title><![CDATA[protobuf 编译安装]]></title><link>https://blog.csdn.net/westhod/article/details/81983072</link><guid>https://blog.csdn.net/westhod/article/details/81983072</guid><author>westhod</author><pubDate>Thu, 23 Aug 2018 16:58:58 +0800</pubDate><description><![CDATA[今天在安装protobuf时，发现网上的protobuf编译安装教程已经落后了，所以记录下来，有需要的朋友可参考。

我是在Ubuntu虚拟机上安装的。

首先在githup上下载源码：

wget -v -O protobuf.zip https://codeload.github.com/protocolbuffers/protobuf/zip/master

然后解压

unzip prot...]]></description><category></category></item><item><title><![CDATA[golang 生成对应的数据表struct定义]]></title><link>https://blog.csdn.net/westhod/article/details/81456898</link><guid>https://blog.csdn.net/westhod/article/details/81456898</guid><author>westhod</author><pubDate>Mon, 06 Aug 2018 17:30:21 +0800</pubDate><description><![CDATA[在开发过程中，常常需要将数据库表对应到golang的一个struct，特别是使用一些ORM工具，sqlx库等，我是个懒人，即使数据表的字段不多，我也懒得去一个个对应的敲入代码，更别提数据表字段比较多的情况了，码农的时间，不能浪费在这啊，对吧？所以我在想，是不是有办法可以自动生成。我在工作时，用得最多的是mysql了，因此，本文针对mysql的数据表来自动生成golang 的struct定义。mys...]]></description><category></category></item><item><title><![CDATA[golang sqlx用法笔记]]></title><link>https://blog.csdn.net/westhod/article/details/81205758</link><guid>https://blog.csdn.net/westhod/article/details/81205758</guid><author>westhod</author><pubDate>Thu, 26 Jul 2018 15:05:58 +0800</pubDate><description><![CDATA[在上一篇文章中吐槽了golang 数据库查询接口（https://mp.csdn.net/postedit/80799266），后来在网上找到了sqlx这个第三方库，用起来确实爽多了，这里记录下学习和用法的心得

安装：
使用命令即可


go get github.com/jmoiron/sqlx

介绍：
官方的介绍如下：


sqlx is a library which provides ...]]></description><category></category></item><item><title><![CDATA[go语言数据库查询后对结果的处理方法的探讨]]></title><link>https://blog.csdn.net/westhod/article/details/80799266</link><guid>https://blog.csdn.net/westhod/article/details/80799266</guid><author>westhod</author><pubDate>Wed, 27 Jun 2018 17:27:32 +0800</pubDate><description><![CDATA[go语言提供标准接口以及有第三方的驱动实现了对mysql等数据库的操作，对于数据查询结果的处理，比较蛋疼，先看示例代码，假设有这样的表student：建表的sql如下：CREATE TABLE `student` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `nick` varchar(64)...]]></description><category></category></item><item><title><![CDATA[go-sql-driver/mysql是如何被调用的]]></title><link>https://blog.csdn.net/westhod/article/details/80706836</link><guid>https://blog.csdn.net/westhod/article/details/80706836</guid><author>westhod</author><pubDate>Fri, 15 Jun 2018 17:08:18 +0800</pubDate><description><![CDATA[最近学习到go语言使用go-sql-driver/mysql驱动时，遇到一些问题，这里总结和分析下，看对gopher们有木有用。首先，网上找的文章，大都是雷同的怎么怎么使用，但比较少涉及到具体的调用流程，我也是初学者，理解不一定透彻，如有问题，读者朋友们请不吝赐教。网上的文章包括官方都是说先导入包：import (	&quot;database/sql&quot;	_&quot;github.com/go-sql-driver...]]></description><category></category></item><item><title><![CDATA[windows下Go语言开发环境安装]]></title><link>https://blog.csdn.net/westhod/article/details/80436307</link><guid>https://blog.csdn.net/westhod/article/details/80436307</guid><author>westhod</author><pubDate>Thu, 24 May 2018 17:37:00 +0800</pubDate><description><![CDATA[最近开始学习Go语言，在安装开发环境时遇到一些问题，记录下来，以便遇到相同问题的朋友能参考。一、开发包安装1. 话不多说，首先第一步，安装Go语言的开发包，下载地址：http://www.golangtc.com/download选择合适的安装包，我的系统是64位的win7，因此选择了windows-amd64.msi下载完后双击安装程序，我是默认安装到C:\Go下。2.安装完成后默认在系统环境变...]]></description><category></category></item></channel></rss>